mirror of
https://github.com/plankanban/planka.git
synced 2025-07-22 06:39:44 +02:00
ref: Rename folder to dir for consistency
This commit is contained in:
parent
917dcf31cf
commit
9794919fd2
8 changed files with 21 additions and 21 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue