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

Upload destination Options
RussClarke
#1 Posted : Monday, November 07, 2011 5:58:49 AM
Rank: Newbie

Groups: Registered

Joined: 11/7/2011
Posts: 2

Hi,

I'm currently evaluating SlickUpload for a new clients development using MVC3/Razor.

So far it ticks all the boxes but one thing I can't seem to see the answer for is how to change the location where SU saves a file.

 

Our requirement is that an upload will have to be directed to a folder that is created for the user who initiated the upload, but I can't seem to see how to do this ?

 

Sorry if I'm missing something really obvious in the documents and I'll appreciate any help!

Axosoft
#2 Posted : Monday, November 07, 2011 7:34:59 AM
Rank: Administration


Groups: Administrators

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

You can do this by creating a class that inherits from FileUploadStreamProvider, and overriding the GetServerFileName method. Take a look at the CustomFileName sample for an example of doing this. That sample bases the folder on a value selected by the user on the client. In your case, you'd replace that code with a server side lookup based on user.

RussClarke
#3 Posted : Monday, November 07, 2011 7:41:07 AM
Rank: Newbie

Groups: Registered

Joined: 11/7/2011
Posts: 2
Aha yes, that's just what I need.

Thanks very much!
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.