AnsweredAssumed Answered

FileUpload.hide() missing in dnd-upload

Question asked by sunquanbin on Mar 14, 2014
Latest reply on Mar 18, 2014 by sunquanbin
Where using FileUpload in share, the following code returns the built-in FileUpload:

fileUpload = Alfresco.getFileUploadInstance();


By looking into the source code (file-upload.js), it can be seen the FileUpload returns its uploader instance with the priority of flash-upload > dnd-upload > html-upload.

It provide two functions: .show(config) and .hide().

The following code should close the FileUpload window:

fileUpload.hide();


It works if flash is available in the browser. However, if flash is not supported. The FileUpload will use dnd-upload instead and the .hide() method is not implemented (in dnd-upload.js). Thus the function call will fail as no such method defined.

Is this a bug or I am not using the FileUpload correctly?

Thanks in advance.

Sun

Outcomes