DNDUpload in dashlet
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2014 05:38 AM
Hello, I am trying to put in my dashlet option to upload document, I added there custom button and I have event for it.
This code return javascript error :
In
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>
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2014 11:32 AM
Hi Jan,
You have to add the uploader components in the template instance of the page :
As you want it in a dashlet, and as the dashboard does not have a single template instance, it's a bit more complicated.
I think you'll have to add the uploaders in each one of the dashboard template instances : dashboard-1-column.xml, dashboard-2-columns-wide-left.xml, …
You have to add the uploader components in the template instance of the page :
<!– Uploaders –> <component> <region-id>html-upload</region-id> <url>/components/upload/html-upload</url> </component> <component> <region-id>flash-upload</region-id> <url>/components/upload/flash-upload</url> </component> <component> <region-id>file-upload</region-id> <url>/components/upload/file-upload</url> </component> <component> <region-id>dnd-upload</region-id> <url>/components/upload/dnd-upload</url> </component> <component> <region-id>archive-and-download</region-id> <url>/components/download/archive</url> </component>
As you want it in a dashlet, and as the dashboard does not have a single template instance, it's a bit more complicated.
I think you'll have to add the uploaders in each one of the dashboard template instances : dashboard-1-column.xml, dashboard-2-columns-wide-left.xml, …
