mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 04:21:17 +01:00
Build pipeline improvements
- Refactor meta/css - `fs.link` usage consolidated to `file.link` - rimraf built modules directory to fix error - Remove `local-assets` flag
This commit is contained in:
@@ -108,11 +108,7 @@ uploadsController.uploadSound = function (req, res, next) {
|
||||
var soundsPath = path.join(__dirname, '../../../build/public/sounds'),
|
||||
filePath = path.join(__dirname, '../../../public/uploads/sounds', uploadedFile.name);
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
fs.link(filePath, path.join(soundsPath, path.basename(filePath)));
|
||||
} else {
|
||||
fs.symlink(filePath, path.join(soundsPath, path.basename(filePath)), 'file');
|
||||
}
|
||||
file.link(filePath, path.join(soundsPath, path.basename(filePath)));
|
||||
|
||||
fs.unlink(uploadedFile.path, function (err) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user