mirror of
https://github.com/documize/community.git
synced 2025-07-21 14:19:43 +02:00
Improve document attachment upload process
Increase to 50MB file size.
This commit is contained in:
parent
075060d11c
commit
6dfb1ad2e5
1 changed files with 12 additions and 3 deletions
|
@ -12,9 +12,11 @@
|
||||||
import { computed } from '@ember/object';
|
import { computed } from '@ember/object';
|
||||||
import { notEmpty } from '@ember/object/computed';
|
import { notEmpty } from '@ember/object/computed';
|
||||||
import { inject as service } from '@ember/service';
|
import { inject as service } from '@ember/service';
|
||||||
|
import Modals from '../../mixins/modal';
|
||||||
|
import Notifier from '../../mixins/notifier';
|
||||||
import Component from '@ember/component';
|
import Component from '@ember/component';
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend(Modals, Notifier, {
|
||||||
documentService: service('document'),
|
documentService: service('document'),
|
||||||
appMeta: service(),
|
appMeta: service(),
|
||||||
hasAttachments: notEmpty('files'),
|
hasAttachments: notEmpty('files'),
|
||||||
|
@ -53,8 +55,8 @@ export default Component.extend({
|
||||||
method: "post",
|
method: "post",
|
||||||
paramName: 'attachment',
|
paramName: 'attachment',
|
||||||
clickable: true,
|
clickable: true,
|
||||||
maxFilesize: 10,
|
maxFilesize: 50,
|
||||||
parallelUploads: 3,
|
parallelUploads: 5,
|
||||||
uploadMultiple: false,
|
uploadMultiple: false,
|
||||||
addRemoveLinks: false,
|
addRemoveLinks: false,
|
||||||
autoProcessQueue: true,
|
autoProcessQueue: true,
|
||||||
|
@ -64,10 +66,17 @@ export default Component.extend({
|
||||||
});
|
});
|
||||||
|
|
||||||
this.on("queuecomplete", function () {
|
this.on("queuecomplete", function () {
|
||||||
|
self.showDone();
|
||||||
self.getAttachments();
|
self.getAttachments();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.on("addedfile", function ( /*file*/ ) {
|
this.on("addedfile", function ( /*file*/ ) {
|
||||||
|
self.showWait();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.on("error", function (error, msg) { // // eslint-disable-line no-unused-vars
|
||||||
|
self.showNotification(msg);
|
||||||
|
console.log(msg); // eslint-disable-line no-console
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue