Welcome Guest Search | Active Topics | Sign In | Register

Uploader Options
Paul Creedy
Posted: Friday, June 22, 2007 6:48:55 AM
Rank: Advanced Member
Groups: Member

Joined: 6/5/2007
Posts: 76
Been trying to use the uploader and getting nowhere fast.

What do I put in the temp file location?
Absoute path, relative path. Can you give an example please?
I'll need an option that works on dev machine and server as the absolute file path will be different preceeding the wwwroot?

How do I combine a file being uploaded with form fields having values inserted into a database?
eo_support
Posted: Friday, June 22, 2007 12:10:29 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Hi Paul,

Usually you will use a relative path that is relative to the root directory of your application. Such as "~/upload". You can use absolute path but that won't do you any good.

As far as for form fields, you will need to answer these two questions first:

1. Where do you want to put the file? Uploader first uploads the file into the temp directory that you specified, however, if you don't move them, the will eventually be deleted;
2. How do you put the file name into your database. That's something related to your database access and it's should be easy to do since you are basically putting a string into the database.

Thanks
Paul Creedy
Posted: Friday, June 22, 2007 2:02:39 PM
Rank: Advanced Member
Groups: Member

Joined: 6/5/2007
Posts: 76
I now have it uploading into a tempory directory in my web site. I want to move that file and rename it into another directory.

All seems well except I get an error telling me it cannot be copied/moved because another process is using it?

I'm putting the copy file method at the end of the upload event which gets bother the client and server file name/directory. I've check that this is the correct directory/name etc.

Is this because it is ajax and it may still be uploading when the server script is run? Any way of determining when the file has been completely uploaded and released, so that I can do the copy?

Should I be doing this a different way?
eo_support
Posted: Friday, June 22, 2007 2:24:22 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Hi Paul,

That's a known issue. We are working on it and should have an update build very soon.

Thanks
eo_support
Posted: Sunday, June 24, 2007 11:54:57 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Hi Paul,

We have fixed this issue and posted an update build. Please see your private messages for download location.

Thanks
Paul Creedy
Posted: Monday, June 25, 2007 2:43:09 AM
Rank: Advanced Member
Groups: Member

Joined: 6/5/2007
Posts: 76
Thanks

That seems to have worked.
Paul Creedy
Posted: Monday, June 25, 2007 6:20:14 AM
Rank: Advanced Member
Groups: Member

Joined: 6/5/2007
Posts: 76
Mmm! The fix seems to have caused another problem now.

After the upload event I was putting the file name into a string and placing that string into a label control on the page

Now, the label control which did contain the file name extracted from AJAXUploader1.PostedFile is empty.

Therefore I can't see what is in the string as I can't display it on the screen. Any ideas?
eo_support
Posted: Monday, June 25, 2007 6:49:58 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Hi Paul,

Once you have moved the files, you can no longer count on PostedFiles. PostedFiles checks whether the file exists, and if it does not, it will return you an empty list. Could this be the reason?

Thanks
Paul Creedy
Posted: Monday, June 25, 2007 6:52:51 AM
Rank: Advanced Member
Groups: Member

Joined: 6/5/2007
Posts: 76
Another problem.

Even though I uninstalled the previous version, installed the new, copied the dll from the installed bin to my web app bin, I get the following displayed on screens using eo.dll

Unable to initialize the designer..........

However the control does seem to work as expected except that I cannot enter the designer for the existing controls.

Version: 4.0.18.2
System.ComponentModel.Win32Exception: The specified module could not be found
at EO.Web.Internal.cc.a(String A_0)
at EO.Web.Internal.g9.a(Type A_0)
at EO.Web.Internal.f5.a(Control A_0)
at EO.Web.Internal.f5.b(Control A_0)
at EO.Web.Control.a(ControlDesigner A_0, Boolean A_1)



Paul Creedy
Posted: Monday, June 25, 2007 6:58:06 AM
Rank: Advanced Member
Groups: Member

Joined: 6/5/2007
Posts: 76
eo_support wrote:
Hi Paul,

Once you have moved the files, you can no longer count on PostedFiles. PostedFiles checks whether the file exists, and if it does not, it will return you an empty list. Could this be the reason?

Thanks


No, you misunderstand sorry.

I store the filename extracted from PostedFiles is a new string called Clientfilename
Then I copy the files (this now works).
The string still contains the correct filename (I have checked by doing a redirect to another page passing it as a url parameter), but when I try doing this on the same page:

Label1.text=Clientfilename
(in the code behind) before I copy the files

That no longer works now. It is as if there is a screen refresh or something that causes labels on the screen to be cleared.

Paul Creedy
Posted: Monday, June 25, 2007 7:09:44 AM
Rank: Advanced Member
Groups: Member

Joined: 6/5/2007
Posts: 76
Paul Creedy wrote:
Another problem.

Even though I uninstalled the previous version, installed the new, copied the dll from the installed bin to my web app bin, I get the following displayed on screens using eo.dll

Unable to initialize the designer..........

However the control does seem to work as expected except that I cannot enter the designer for the existing controls.

Version: 4.0.18.2
System.ComponentModel.Win32Exception: The specified module could not be found
at EO.Web.Internal.cc.a(String A_0)
at EO.Web.Internal.g9.a(Type A_0)
at EO.Web.Internal.f5.a(Control A_0)
at EO.Web.Internal.f5.b(Control A_0)
at EO.Web.Control.a(ControlDesigner A_0, Boolean A_1)


This was fixed with an uninstall a restart and an re-install.
eo_support
Posted: Monday, June 25, 2007 8:13:31 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Hi Paul,

So you are saying that:

1. Clientfilename originally contains the right value (verified by a redirect to another page passing it as a url parameter);

2. After you copied the files Clientfilename no longer contains the correct value, or it still contains the correct value, but somehow Label1.Text does not show it?

I do not see how a file copying can empty the contents of your variable or how it can affect a Label control, which is completely unrelated to our stuff. So it's very unlikely that it has to do with our controls. But if you don't mind, you can post your code and we can take a look.

Thanks


Paul Creedy wrote:
eo_support wrote:
Hi Paul,

Once you have moved the files, you can no longer count on PostedFiles. PostedFiles checks whether the file exists, and if it does not, it will return you an empty list. Could this be the reason?

Thanks


No, you misunderstand sorry.

I store the filename extracted from PostedFiles is a new string called Clientfilename
Then I copy the files (this now works).
The string still contains the correct filename (I have checked by doing a redirect to another page passing it as a url parameter), but when I try doing this on the same page:

Label1.text=Clientfilename
(in the code behind) before I copy the files

That no longer works now. It is as if there is a screen refresh or something that causes labels on the screen to be cleared.

Paul Creedy
Posted: Monday, June 25, 2007 8:23:41 AM
Rank: Advanced Member
Groups: Member

Joined: 6/5/2007
Posts: 76
I don't understand what is happening either.

2. After you copied the files Clientfilename no longer contains the correct value, or it still contains the correct value, but somehow Label1.Text does not show it?

That is correct. My Clientfilename string still contains the correct file name but I cannot display it on the screen with label1.text=Clientfilename

I'm 99% sure it worked before the update you sent me.

I have this in the upload event, not the page load. I cannot put it in the page load because at that point I can't extract the filenames (at least I don't think I can)

I have postback=true on the upload control

It's probably something simple I'm overlooking.


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.