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

Notification

Icon
Error

Options
Go to last post Go to first unread
daveg  
#1 Posted : Tuesday, March 11, 2008 10:43:52 AM(UTC)
daveg

Rank: Member

Groups: Member
Joined: 2/24/2008(UTC)
Posts: 19

I have aurigma installed on my site and it's working fine apart from one thing i just noticed. If you start a picture upload and then click cancel half way through it evidently still runs the Action script and trys to create the non existent file on my site. I thought the Action script only ran in the event of a successful upload, but given that does not appear to be the case, can anyone tell me how i acknowledge if the upload was successful/was cancelled etc so i can process the file or not accordingly?

Thanks very much,

Dave
Eugene Kosmin  
#2 Posted : Tuesday, March 11, 2008 1:38:44 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 439

Was thanked: 22 time(s) in 22 post(s)
Hello Dave,

This is normal behavior. On the server side upload is processed by action script, so when we abort uploading we abort action script’s work too. You can read more about HTTP upload in RFC1867.

The upload result can be got from Progress event.
Best regards,
Eugene Kosmin.
Aurigma Development Team
daveg  
#3 Posted : Wednesday, March 12, 2008 3:02:35 AM(UTC)
daveg

Rank: Member

Groups: Member
Joined: 2/24/2008(UTC)
Posts: 19

Thanks for your reply, i have had a look at the documentation and am still slightly confused and wondered if you could help?

I am using iu.addParam("Action... to control the php script that the form data is sent to. My action script puts the images in the correct directories and creates some other images so it doesn't have to be done client side and use up bandwidth.

I am then using iu.addParam("RedirectUrl"... to control what page users are directed to after successful upload.

I can see how i could use the progress event to say control when and where a user is redirected to, but i can't see how to use it to control the action script. I think i may be being thick (!) but is there a variable passed to the action script that defines whether the upload was successful/cancelled etc as this is all i need, then it completed i can run the script otherwise not.

Thanks very much for your help, it is very much appreciated,

Dave
daveg  
#4 Posted : Wednesday, March 12, 2008 3:14:09 AM(UTC)
daveg

Rank: Member

Groups: Member
Joined: 2/24/2008(UTC)
Posts: 19

Incidentally i can see that i could use the progress event and put the whole of the action script into the ImageUploader_Progress function when status=complete, however that would presumably mean it wasn't run prior to the user being notified that the upload was complete and wouldn't be able to access the uploaded files?

Dave
Eugene Kosmin  
#5 Posted : Thursday, March 13, 2008 2:03:34 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 439

Was thanked: 22 time(s) in 22 post(s)
Hi Dave,

Progress event with status=complete is called after upload completion and after user notification (at least in IU 5.x).

Besides, you can hide standard upload complete notification through MessageUploadCompleteText property,

here is small code snippet:

Code:
function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText)
{	
	if (Status=="COMPLETE")
	{
		alert("Upload Complete custom message");
		window.location = 'Gallery.aspx';  
	}
}

var iu = new ImageUploaderWriter("ImageUploader", 800, 600);
...
iu.addEventListener("Progress", "ImageUploader_Progress");
...
iu.addParam("Action", "ExtractFiles.aspx");
iu.addParam("MessageUploadCompleteText", "");
iu.writeHtml();
Best regards,
Eugene Kosmin.
Aurigma Development Team
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.