Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Mohsin Ayaz  
#1 Posted : Tuesday, January 7, 2014 5:48:03 AM(UTC)
Mohsin Ayaz

Rank: Newbie

Groups: Member
Joined: 1/7/2014(UTC)
Posts: 2

I am using the flash/html5 based control. I have set the uploadsettings.redirect url to a success page. Is there anyway of restricting redirection only on success. In case of any exception the image is is not uploaded and it takes you to the redirection page. I want it to either remain on the same page or move to an error page.
Andrew  
#2 Posted : Tuesday, January 7, 2014 6:26:23 AM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 876

Thanks: 2 times
Was thanked: 27 time(s) in 27 post(s)
As far as I remember, it already works this way. If it receives a server error (HTTP code other than 200), it does not redirect.

However if you need more control over this, you can use Error event for failures and AfterUpload event for successful uploads. You can redirect using JavaScript instead of the RedirectUrl param.

Hope this helps.
Mohsin Ayaz  
#3 Posted : Wednesday, January 8, 2014 4:09:45 AM(UTC)
Mohsin Ayaz

Rank: Newbie

Groups: Member
Joined: 1/7/2014(UTC)
Posts: 2

Andrew wrote:
As far as I remember, it already works this way. If it receives a server error (HTTP code other than 200), it does not redirect.

However if you need more control over this, you can use Error event for failures and AfterUpload event for successful uploads. You can redirect using JavaScript instead of the RedirectUrl param.

Hope this helps.


Upload works perfectly. The problem occurs while saving file to the disk. The client error event doesn't account for this.
Andrew  
#4 Posted : Wednesday, January 8, 2014 7:24:25 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 876

Thanks: 2 times
Was thanked: 27 time(s) in 27 post(s)
If the upload processing script fails for any reason it should return HTTP code 500. This way the uploader will know that the upload failed.

Edited by user Wednesday, January 8, 2014 7:25:14 PM(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.