mirror of
https://github.com/wekan/wekan.git
synced 2025-12-27 20:58:48 +01:00
use tempdirs
This commit is contained in:
parent
06b812b590
commit
80d0ec0898
3 changed files with 20 additions and 12 deletions
|
|
@ -5,6 +5,8 @@ import { createOnAfterUpload } from './lib/fsHooks/createOnAfterUpload';
|
|||
import { createInterceptDownload } from './lib/fsHooks/createInterceptDownload';
|
||||
import { createOnAfterRemove } from './lib/fsHooks/createOnAfterRemove';
|
||||
|
||||
const os = require('os');
|
||||
|
||||
let attachmentBucket;
|
||||
if (Meteor.isServer) {
|
||||
attachmentBucket = createBucket('attachments');
|
||||
|
|
@ -31,6 +33,7 @@ const insertActivity = (fileObj, activityType) =>
|
|||
Attachments = new FilesCollection({
|
||||
debug: false, // Change to `true` for debugging
|
||||
collectionName: 'attachments',
|
||||
storagePath: os.tmpdir(),
|
||||
allowClientCode: true,
|
||||
onAfterUpload: function onAfterUpload(fileRef) {
|
||||
createOnAfterUpload(attachmentBucket).call(this, fileRef);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue