Skip to content

Commit

Permalink
fix: public storage location
Browse files Browse the repository at this point in the history
  • Loading branch information
wajeht committed Aug 25, 2023
1 parent 09cf490 commit 29e5fbb
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ src/public/index.html
src/public/index.html
src/public/upload/*
src/public/uploads/*
!src/public/uploads/.gitkeep
src/storage/public/upload/*
src/storage/public/uploads/*
/src/storage/uploads/*
Expand Down
3 changes: 0 additions & 3 deletions src/app/server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env node

import SymlinkPublicFolder from '../utils/storage-link.js';
import app from '../app/app.js';
import { port, env, vue_port } from '../config/env.js';
import logger from '../utils/logger.js';
Expand Down Expand Up @@ -146,5 +145,3 @@ process.on('SIGTERM', gracefulShutdown);

// ------------------------------ crons ------------------------------
CronsServices.start();

SymlinkPublicFolder();
1 change: 0 additions & 1 deletion src/public/uploads

This file was deleted.

Empty file added src/public/uploads/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion src/utils/copy-mock-videos.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import path from 'path';
import logger from './logger.js';

const buildAbsolutePath = (name) => path.resolve(path.join(process.cwd(), 'src', 'database', 'seeds', 'mock-data', name)); // prettier-ignore
const UPLOAD_FOLDER_PATH = path.resolve(path.join(process.cwd(), 'src', 'storage', 'uploads'));
const UPLOAD_FOLDER_PATH = path.resolve(path.join(process.cwd(), 'src', 'public', 'uploads'));

const tempVideos = {
squat: {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/multer.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const videoLimits = {

const storage = multer.diskStorage({
destination: (req, file, cb) => {
cb(null, path.resolve(path.join(process.cwd(), 'src', 'storage', 'uploads')));
cb(null, path.resolve(path.join(process.cwd(), 'src', 'public', 'uploads')));
},
filename: (req, file, cb) => {
const fileExtension = file.originalname.split('.')[1];
Expand Down

0 comments on commit 29e5fbb

Please sign in to comment.