0

Salvete! When we set up the asp.net file-uploading control called "NeatUpload", it saves its files to a temporary location, either "YOUR_APP_ROOT /app_data/NeatUpload_Temp/", if the directory is writable, or to the system's temp folder. However, the demo does not seem to actually upload any files, nor does it include an example for saving the files to a particular directory.

How do we save the file we have uploaded and move the uploaded file to a particular folder? My only clue from the documentation is that it has to do with UploadStorageProvider, but I need some help to implement this.

bgmCoder
  • 6,205
  • 8
  • 58
  • 105
  • 1
    I would have tagged this question with `NeatUpload`, but I don't have enough rep yet to create tags. There are a number of questions here at StackOverflow about NeatUpload; a tag might be a good idea. – bgmCoder May 04 '12 at 16:34
  • i totally agree with your tag idea. – rlee923 Jun 20 '12 at 07:52

1 Answers1

1

if you read the documentation 3.3 point 6 :

In your codebehind file, process the uploaded file. If you are using the InputFile control, the uploaded file's client-specified name, MIME type, and contents can be accessed via inputFileId.FileName, inputFileId.ContentType, and inputFileId .FileContent, respectively.
If you want to keep the uploaded file, you must use the inputFileId.MoveTo()method to move the uploaded file to a permanent location. If you do not, NeatUpload will automatically remove the uploaded file at the end of the requestto ensure that unwanted files do not fill up the filesystem. The following code will put the uploaded file in the application's root directory (assuming sufficient permissions):

and so on. I hope this is what you are after.

rlee923
  • 758
  • 3
  • 14
  • 28
  • Mr. Lee, I will be working on this in the upcoming week, and will respond here when I get to it. – bgmCoder Jun 29 '12 at 04:01
  • Thanks, Mr. Lee. That clue did the trick. I found this line from the demo: inputFile.StorageConfig["tempDirectory"] = Path.Combine("App_Data", "file1temp"); - and changed "App_Data" to a full path of where I wanted the file to go. That worked. – bgmCoder Jul 02 '12 at 20:39