AnsweredAssumed Answered

DNDUpload in dashlet

Question asked by .jan on Aug 28, 2014
Latest reply on Sep 5, 2014 by tonyrivet
Hello, I am trying to put in my dashlet option to upload document, I added there custom button and I have event for it.

if (null == this.fileUpload) {
    this.fileUpload = Alfresco.getFileUploadInstance();
}
var multiUploadConfig =
{
    siteId: this.options.componentId,
    containerId: this.options.componentId,
    path: destination,
    filter: [],
    mode: this.fileUpload.MODE_MULTI_UPLOAD,
}
this.fileUpload.show(multiUploadConfig);

This code return javascript error :
Uncaught Error: No instance of uploader type 'Alfresco.DNDUpload' exists.


In
.ftl
file of my dashlet I include this :

<@script type="text/javascript" src="${page.url.context}/res/components/upload/dnd-upload.js"></@script>
<@script type="text/javascript" src="${page.url.context}/res/components/upload/file-upload.js"></@script>
<@script type="text/javascript" src="${page.url.context}/res/components/upload/html-upload.js"></@script> 
<@script type="text/javascript" src="${page.url.context}/res/components/upload/flash-upload.js"></@script>

Outcomes