File uploader for asp.net mvc?

I use the jquery MultiFile script After adding the jquery and multifile script references to your page, you would then add a file input to your form and set the class="multi input type="file" width="50" id="fileUpload" class="multi" runat="server On postback, I iterate through the uploaded files and save them to a directory on the server or the cloud or wherever for (int I = 0; I 0) { int retVal = saveFile((HttpPostedFile)Request. Filesi); if (retVal! = -1) documentID.

Add(retVal); // documentID is a list of ID in my sql database. This code is located in a user control for document management. } } // note I have a few utility methods here... private int saveFile(HttpPostedFile file) { if (file.

ContentLength > 0) { string directory = Server. MapPath(SiteRoot + UploadURL); string directory_filename_uploaded = directory + file.FileName. Substring(file.FileName.

LastIndexOf("\\") + 1); // make sure its unique so we don't overwrite. String directory_filename_unique = Document. GetUniqueFilename(directory_filename_uploaded); string filename_unique = directory_filename_unique.

Substring(directory_filename_unique. LastIndexOf("\\") + 1); file. SaveAs(directory_filename_unique); return insertFile(filename_unique); } else return -1; }.

I use the jquery MultiFile script. After adding the jquery and multifile script references to your page, you would then add a file input to your form and set the class="multi" On postback, I iterate through the uploaded files and save them to a directory on the server or the cloud or wherever. For (int I = 0; I 0) { int retVal = saveFile((HttpPostedFile)Request.

Filesi); if (retVal! = -1) documentID. Add(retVal); // documentID is a list of ID in my sql database.

This code is located in a user control for document management. } } // note I have a few utility methods here... private int saveFile(HttpPostedFile file) { if (file. ContentLength > 0) { string directory = Server.

MapPath(SiteRoot + UploadURL); string directory_filename_uploaded = directory + file.FileName. Substring(file.FileName. LastIndexOf("\\") + 1); // make sure its unique so we don't overwrite.

String directory_filename_unique = Document. GetUniqueFilename(directory_filename_uploaded); string filename_unique = directory_filename_unique. Substring(directory_filename_unique.

LastIndexOf("\\") + 1); file. SaveAs(directory_filename_unique); return insertFile(filename_unique); } else return -1; }.

String directory_filename_uploaded = directory + file.FileName. // make sure its unique so we don't overwrite. String directory_filename_unique = Document.

String filename_unique = directory_filename_unique.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions