mirror of
https://github.com/plankanban/planka.git
synced 2025-08-02 20:15:27 +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
|
@ -50,7 +50,7 @@ module.exports = {
|
|||
const fileManager = sails.hooks['file-manager'].getInstance();
|
||||
|
||||
try {
|
||||
await fileManager.deleteFolder(
|
||||
await fileManager.deleteDir(
|
||||
`${sails.config.custom.attachmentsPathSegment}/${attachment.dirname}`,
|
||||
);
|
||||
} catch (error) {
|
||||
|
|
|
@ -16,12 +16,12 @@ module.exports = {
|
|||
const fileManager = sails.hooks['file-manager'].getInstance();
|
||||
|
||||
const dirname = uuid();
|
||||
const folderPathSegment = `${sails.config.custom.attachmentsPathSegment}/${dirname}`;
|
||||
const dirPathSegment = `${sails.config.custom.attachmentsPathSegment}/${dirname}`;
|
||||
const filename = filenamify(inputs.file.filename);
|
||||
|
||||
const filePath = await fileManager.move(
|
||||
inputs.file.fd,
|
||||
`${folderPathSegment}/${filename}`,
|
||||
`${dirPathSegment}/${filename}`,
|
||||
inputs.file.type,
|
||||
);
|
||||
|
||||
|
@ -64,7 +64,7 @@ module.exports = {
|
|||
.toBuffer();
|
||||
|
||||
await fileManager.save(
|
||||
`${folderPathSegment}/thumbnails/cover-256.${thumbnailsExtension}`,
|
||||
`${dirPathSegment}/thumbnails/cover-256.${thumbnailsExtension}`,
|
||||
resizeBuffer,
|
||||
inputs.file.type,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue