Menu

#35 Call afterUploadURL after an unsuccessful upload

v1.0_(example)
pending
nobody
5
2014-12-03
2014-11-26
Yoda6
No

Hi,

First of all thank you for your great work !
But I have an issue : I would like to send a message to my specified afterUploadURL after an unsuccessful upload (for example when my file is too big) in order to display an error template in my front page (instead of an alert)
It's possible to do it with the current version of the Applet ?

Regards,
Antoine

Discussion

  • Geoff

    Geoff - 2014-11-26

    Hi,
    I think I've seen some discussion on here about intercepting the response with Javascript. You could then post (AJAX) that to your URL. ...Or I might have dreamed that! ;-)

    Or you might be able to make use of the 'urlToSendErrorTo' param perhaps?
    http://jupload.sourceforge.net/howto-customization.html

    Rgds,
    Geoff

     
  • Yoda6

    Yoda6 - 2014-11-27

    Hi Geoff,

    Thanks for your reply, I looked at 'urlToSendErrorTo' but I think this feature is used for "debug" messages and is not suitable for a production environment.
    I finally found a (ugly) solution :

    In FileUploadManagerThreadImpl.setUploadException

    this.uploadPolicy.getContext().getWindow().call(this.uploadPolicy.getOnUploadCompleted() , new Object[] {errMsg});

    Regards,
    Antoine

     
  • Etienne

    Etienne - 2014-12-03
    • status: open --> pending
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB