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

Form with other data Options
hkanitkar
#1 Posted : Monday, August 17, 2009 6:40:04 PM
Rank: Newbie

Groups: Registered

Joined: 8/17/2009
Posts: 4
Location: Englewood, CO

Hello,
We envision our upload page with 2-3 fields corresponding to the video to upload and an upload button at the bottom i.e.

Video Name    Artist Name    Browse
Video Name2   Artist Name2 Browse2

               Upload All

Can we create this functionality with this control? We are using ASP.NET MVC 1.0 with c#.

 

Thanks!

 

Axosoft
#2 Posted : Monday, August 17, 2009 7:15:33 PM
Rank: Administration


Groups: Administrators

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

SlickUpload is designed very modularly. There are two ways to approach this problem:

 - If you want to retain all the dynamic functionality of the SlickUpload control, you can use it's templating functionality. Take a look at the AdditionalFields sample (available online here: http://krystalware.com/Products/SlickUpload/Demos/AdditionalFields/DefaultCS.aspx, or in the download package). Basically, you can template the item that is displayed for each file, adding your own controls if desired. You can then access the fields associated with each file via the FormValues collection of each file.

 - If you want to hardcode the number of rows and have exposed browse buttons like you show in the example below, you could sidestep using the SlickUpload control and use some of its component controls instead. The SlickUpload control is actually made up of four controls -- the FileSelector (the add/browse button to select files), the FileList (to display selected files), the UploadProgressDisplay (to display progress during an upload), and the UploadConnector (to tie them all together). In this case, you would use the UploadProgressDisplay and UploadConnector controls to display progress and manage the upload, and then just use normal <input> tags or ASP.NET controls to create the file selection interface. If you want to go this route and would like an example, let me know and I'll whip one up for you.

Let me know if you have any other questions.

hkanitkar
#3 Posted : Tuesday, August 18, 2009 11:21:21 AM
Rank: Newbie

Groups: Registered

Joined: 8/17/2009
Posts: 4
Location: Englewood, CO

Chris,

This might work for us. I need to convert this to MVC, but that should be OK. I will post more questions if I hit a wall...

Thanks for your help!
Harshu

hkanitkar
#4 Posted : Tuesday, August 18, 2009 1:11:34 PM
Rank: Newbie

Groups: Registered

Joined: 8/17/2009
Posts: 4
Location: Englewood, CO

Chris,

Couple of other questions:

1. How do I set maxfiles element dynamically, either through JQuery/Javascript or programatically using ViewData/TempData in Asp.NET MVC?

2. Validation - is there a minimum we can set without which the form will not upload?

Thanks!
Harshu

Axosoft
#5 Posted : Wednesday, August 19, 2009 12:20:57 PM
Rank: Administration


Groups: Administrators

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

Answered on your other thread...

AaronInCincy
#6 Posted : Tuesday, January 24, 2012 2:59:16 PM
Rank: Newbie

Groups: Registered

Joined: 1/24/2012
Posts: 3

At the risk of resurrecting a dead thread, is there still a way to do this?  We want to include a name and email address along with multiple file uploads.  We're building this in MVC3 with Razor, but I don't see this example on your demos page any longer.  Can I create a viewmodel that contains a Name, Email, and UploadSession?  Will the modelbinder work that way?

Thanks,

Aaron

Axosoft
#7 Posted : Tuesday, January 24, 2012 3:06:21 PM
Rank: Administration


Groups: Administrators

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

How is your form set up? Are you trying to provide a name and email address per file? Or a name and email address, and then a list of files?

AaronInCincy
#8 Posted : Tuesday, January 24, 2012 3:09:24 PM
Rank: Newbie

Groups: Registered

Joined: 1/24/2012
Posts: 3

It would be a name and email address, then a list of files.

Axosoft
#9 Posted : Tuesday, January 24, 2012 3:18:01 PM
Rank: Administration


Groups: Administrators

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

You should be able to use an action method like:

    public ActionResult Upload(string name, string email, UploadSession session);

for sure. I think the model binding will also work into a model object, but we haven't tested all permutations of that. Let me know if you run into any issues.

If you are having issues with model binding, you can also access the current session via the SlickUploadContext.CurrentUploadSession accessor.

AaronInCincy
#10 Posted : Tuesday, January 24, 2012 3:23:40 PM
Rank: Newbie

Groups: Registered

Joined: 1/24/2012
Posts: 3

Great, thanks for the help.  I'll let you know if I run into any issues.

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.