|
Rank: Newbie Groups: Member
Joined: 9/15/2009 Posts: 2
|
Hi, I'm trying to programatic generate a AjaxUpload control
Code: C#
EO.Web.AJAXUploader au = new EO.Web.AJAXUploader();
au.ID = "UpLoadTest";
au.TempFileLocation = Page.Server.MapPath(".//tmp//");
au.FinalFileLocation = Page.Server.MapPath(".//tmp//done//");
au.MaxDataSize = 1000;
parentDiv.Controls.Add(au);
It upload files with the extensions : *.data, *.info and *.status in the TmpFileLocation but it don't copy the files to FinalFileLocation. The control is inside a ajax.net UpdatePanel; is this a problem? Best regards Per
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The files won't be copied over the FinalFileLocation untill FileUploaded event is fired. That implies two things: a post back must occur and when the post back occurs, the uploader must be still there. So if you added the uploader initially but did not add the uploader again at exactly the same location when the page posts back, ASP.NET won't find the uploader control to fire the event and the files won't get moved over.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 6/3/2009 Posts: 27
|
Did this problem get resolved? I had this exact same behavior. The .data, .status and .info files are in the TempFileLocation, but they don't get moved to the FinalFileLocation. The progress bar got to 100% and the postback occurred, refreshing the page back to its original state, ready to upload another file. But the FileUploaded event isn't firing, so the file isn't getting moved to the path set in the FinalFileLocation. Our page isn't dynamically adding the control, it's always there.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I believe the original issue posted by per wasn't a problem, it was just the page did not post back. So your issue appears to be somewhat different. Please try to isolate the problem into a separate test page and we will be happy to take a look.
Thanks
|
|
Rank: Member Groups: Member
Joined: 6/3/2009 Posts: 27
|
I can't replicate the issue, that's the problem. I just know that I saw it with my own eyes .. I was watching the directory specified in the TempFileLocation while a customer of ours was uploading a file. It was the 2nd time she uploaded this particular file on that day, and both times it completed the upload to the TempFileLocation without copying the file to the FinalFileLocation. Bottom line is that the FileUploaded event didn't fire. Since the firing of that event is something built into your control itself, I just need to know what would cause it not to fire.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
There can be many reasons why file upload fails. For example, there might have been a network issue, or file permission issue, or IIS setting issues, or a temporary server loading issue, or even user code error, etc. Many of those are not only out of the scope of our support, but also completely out of our controls. Thus we do not investigate single incident unless you can reproduce it.
Thanks
|
|
Rank: Member Groups: Member
Joined: 6/3/2009 Posts: 27
|
I'm sorry, but that answer is not acceptable. In this instance, the file did successfully get uploaded in its entirety to the TempFileLocation, so I think we established that there's not an IIS, network or file permission issue. There's nothing in my code which would impede the FileUploaded event from firing .. in fact, I have no control over whether that event fires. All I've done is to set the value of the "OnFileUploaded" to the name of the server-side method I want it to run when the page posts back. The upload completes, the page posts back, but my server-side method doesn't get run .. simple as that. From YOUR testing (not mine) I just need to know what would cause that event to not fire. It's not my fault that I cannot get your control to replicate this behavior .. trust me, I wish it would fail like this every time, it would make it easier to figure out.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Dan wrote:From YOUR testing (not mine) I just need to know what would cause that event to not fire. I understand your frustration but please understand that we can not tell for sure unless we can look in the problem, otherwise we could keep shooting in the dark and it will be very hard to really get to anywhere that way. Thus we always require you to isolate and duplicate the issue first.
|
|
Rank: Newbie Groups: Member
Joined: 9/15/2009 Posts: 2
|
Yes, the problem was resolved. I didn't build my page the right way on post-back. /Per
|
|