mirror of
https://github.com/plankanban/planka.git
synced 2025-12-17 17:23:25 +03:00
ref: Rename folder to dir for consistency
This commit is contained in:
@@ -33,7 +33,7 @@ module.exports = {
|
||||
const fileManager = sails.hooks['file-manager'].getInstance();
|
||||
|
||||
const dirname = uuid();
|
||||
const folderPathSegment = `${sails.config.custom.projectBackgroundImagesPathSegment}/${dirname}`;
|
||||
const dirPathSegment = `${sails.config.custom.projectBackgroundImagesPathSegment}/${dirname}`;
|
||||
|
||||
let { width, pageHeight: height = metadata.height } = metadata;
|
||||
if (metadata.orientation && metadata.orientation > 4) {
|
||||
@@ -46,7 +46,7 @@ module.exports = {
|
||||
const originalBuffer = await image.toBuffer();
|
||||
|
||||
await fileManager.save(
|
||||
`${folderPathSegment}/original.${extension}`,
|
||||
`${dirPathSegment}/original.${extension}`,
|
||||
originalBuffer,
|
||||
inputs.file.type,
|
||||
);
|
||||
@@ -64,7 +64,7 @@ module.exports = {
|
||||
.toBuffer();
|
||||
|
||||
await fileManager.save(
|
||||
`${folderPathSegment}/cover-336.${extension}`,
|
||||
`${dirPathSegment}/cover-336.${extension}`,
|
||||
cover336Buffer,
|
||||
inputs.file.type,
|
||||
);
|
||||
@@ -72,7 +72,7 @@ module.exports = {
|
||||
console.warn(error1.stack); // eslint-disable-line no-console
|
||||
|
||||
try {
|
||||
fileManager.deleteFolder(folderPathSegment);
|
||||
fileManager.deleteDir(dirPathSegment);
|
||||
} catch (error2) {
|
||||
console.warn(error2.stack); // eslint-disable-line no-console
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user