0

I want to upload big files per ftp and as I am not able to get the full path for security reasons, I search for a method to create a FileStream for example from a Filechooser WITHOUT already uploading the file. As far as I understood, when I use PostedFile, it will be already uploaded. As the files are vergy big, this is not the solution I search for. Is there any solution?

maiki86
  • 25
  • 4
  • 1
    [Possible duplicate](http://stackoverflow.com/questions/1046230/streaming-large-file-uploads-to-asp-net-mvc) – Chris Nov 29 '12 at 17:26
  • @Rfvgyhn I don't think it's a duplicate, but it's definitely related and can help solve his problem I think – Earlz Nov 29 '12 at 17:31

1 Answers1

1

No.

You can't access to local file from JavaScript, you can't run server side C# code against client side file system.

You need some sort of client side application to do that. You can use Silverlight/Flash to get a stream as result of file picker dialog and upload files that way. Possible Flash approach covered in ActionScript2: Adding file upload functionality.

Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179
  • Thanks, that helps me, as it is a clear answer :) I will search for a Silverlight solution - I already tried actually but got errors, that I am not allowed to access local machine. Probably I just got the wrong approach. – maiki86 Nov 29 '12 at 17:39
  • Here is the solution in silverlight, but you have to create a full trusted application: http://www.c-sharpcorner.com/uploadfile/dpatra/local-file-access-in-silverlight-4/ – maiki86 Nov 29 '12 at 17:55