mirror of
https://github.com/wekan/wekan.git
synced 2026-02-25 17:34:07 +01:00
Move Attachment to other storages now possible
This commit is contained in:
parent
536fb00d61
commit
44fd652b05
9 changed files with 383 additions and 99 deletions
|
|
@ -28,9 +28,22 @@ Avatars = new FilesCollection({
|
|||
}
|
||||
return 'avatar-too-big';
|
||||
},
|
||||
onAfterUpload: createOnAfterUpload(avatarsBucket),
|
||||
interceptDownload: createInterceptDownload(avatarsBucket),
|
||||
onAfterRemove: createOnAfterRemove(avatarsBucket),
|
||||
onAfterUpload(fileObj) {
|
||||
Object.keys(fileObj.versions).forEach(versionName => {
|
||||
createOnAfterUpload(this, avatarsBucket, fileObj, versionName);
|
||||
});
|
||||
},
|
||||
interceptDownload(http, fileObj, versionName) {
|
||||
const ret = createInterceptDownload(this, avatarsBucket, fileObj, http, versionName);
|
||||
return ret;
|
||||
},
|
||||
onAfterRemove(files) {
|
||||
files.forEach(fileObj => {
|
||||
Object.keys(fileObj.versions).forEach(versionName => {
|
||||
createOnAfterRemove(this, avatarsBucket, fileObj, versionName);
|
||||
});
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
function isOwner(userId, doc) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue