[Multiple File Upload] When file is not of supported extension, the feedback message is not shown

Forge Component
(52)
Published on 26 Jun by Remco Dekkinga
52 votes
Published on 26 Jun by Remco Dekkinga

Hi,


when the processfile is throwing an exception (because of an unsupportedextension, the feedback-message is not shown)


Hi,

Sample problem here how to throw a feedback-message if not supported extension.


Thank you,

Jed

J. wrote:

Hi,


when the processfile is throwing an exception (because of an unsupportedextension, the feedback-message is not shown)


Hi,

i also have the same problem with the feedback message from filename too long
it only appears if i refresh the page or move to another page

Solution

Hi,

This problem has been fixed by the latest version. Please check the sample on how to implement the feedback message on your side.

The messages should be grouped before you show them, otherwise your messages are overwritten for each error.

Kind regards,

Remco Dekkinga

Solution

In my case, the Stack Java (case sensitive) was changed only in the javascript inserted in the "MultipleFileUpload" webblock screen to match the parameter names of the screen that processes the files.


Before:

    action: '"+EncodeJavaScript(FileProcessURL)+"',

params: {

sessionid: '" + EncodeJavaScript(SessionId) + "',

        supportedextensions: '" + EncodeJavaScript(SupportedExtensions) + "'

}


After:

    action: '"+EncodeJavaScript(FileProcessURL)+"',

params: {

SessionId: '" + EncodeJavaScript(SessionId) + "',

        SupportedExtensions: '" + EncodeJavaScript(SupportedExtensions) + "'

}