cancel
Showing results for 
Search instead for 
Did you mean: 

FileUpload.hide() missing in dnd-upload

sunquanbin
Champ on-the-rise
Champ on-the-rise
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
3 REPLIES 3

afaust
Legendary Innovator
Legendary Innovator
Hello,

I would consider this a bug - uploaders and their dialogs should have a consistent API from my point of view. So I'd say feel free to raise a JIRA for this…

Regards
Axel

sunquanbin
Champ on-the-rise
Champ on-the-rise
Thanks for the reply.

Would you please tell me more about how to raise a JIRA (I don't know what it stands for)?

Thanks
Sun

afaust
Legendary Innovator
Legendary Innovator
Hello,

JIRA is the public issue management system Alfresco uses to track bugs, enhancements and contributions. It is the main channel for the Alfresco community to submit problems that Alfresco engineering should take a look at.

To submit a JIRA ticket, simply go to https://issues.alfresco.com, create an account and use the "create issue" action in the "issues" menu. Fill out the form to the best of your abilities, especially taking care of which version of Alfresco you are using and how someone else may reproduce the problem (step-by-step guide). In case of customization issues, it would be helpful to provide sample code instead of writing an essay to explain a technical aspect.
The project for the issue should be "Alfresco" or "ALF" and you can even select the component that the issue affects (e.g. "Share Application").

Regards
Axel