SlickUpload
Welcome Guest Search | Active Topics | Log In | Register

ServerLocation is empty Options
glittle
#1 Posted : Thursday, January 26, 2012 12:48:23 AM
Rank: Newbie

Groups: Registered

Joined: 1/26/2012
Posts: 1
Location: Calgary, AB

I have a custom class based on UploadStreamProviderBase.

When I upload a file, I can debug and see that the code in my upload provider is running.  The UploadedFile (uf) passed to the provider has an empty ServerLocation, and ContentLength is 0.  However, uf.UploadRequest.ContentLength does show a large value. 

Where is my file going?  And how do I get at it?

Thanks,
Glen

Axosoft
#2 Posted : Thursday, January 26, 2012 12:23:22 PM
Rank: Administration


Groups: Administrators

Joined: 7/7/2005
Posts: 1,586
Location: Scottsdale, AZ

Can you send me the code you have for your UploadStreamProvider? chris@slickupload.com.

What are you trying to do? Are you trying to upload to the filesystem or something else? If you're trying to upload to a file, you may want to derive from FileUploadStreamProvider and override GetServerFileName to define where to put the file. That way, you don't have to reimplement the file streaming functionality.

The file's contentlength isn't known until after the upload is complete. This is because the file length isn't passed by the browser -- the length of the entire request is passed, but there is encoding, header, and other form item data that make the contentlength passed slightly more than the actual file size.

file.ServerLocation is a value set by the UploadStreamProvider to let code in the UploadComplete event know where the file was stored. The UploadStreamProvider is responsible for setting file.ServerLocation, so if your UploadStreamProvider doesn't set it, it will be empty.

Users browsing this topic
Guest
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.