3

I would like to upload file from the client to the server with a Front End in SilverLight.

My problem is that the file is NOT in the isolation storage (that would be easy!).

The application in few word require to upload images from the user computer similar to the file uploaded FaceBook, (the Java version).

Is there a way to grant permission from the user OR a trick that I might not know to be able to upload files?

Thank you *I do not want to use the Open File Dialog.

Patrick Desjardins
  • 136,852
  • 88
  • 292
  • 341
  • 1
    how will you know what file to upload without using the dialog? this is actually a security feature of silverlight, i.e. a silverlight app cannot read local files - unless a user has navigated to the file in the open file dialog. – russau Jun 08 '09 at 13:04
  • The goal is to create a kind of uploader like Facebook (able to select multiple file with preview and on many folder). The OpenFileDialog is not very customizable. And second, let say the user select 100 images from the open file dialog, do some editing with the SilverLight application and decide to upload to the server only few images. I would like to be able to upload only the selected one and not the 100 images. That mean that I would like to select some images from the 100 and upload them LATER in the process. That would require me some privileges to upload them without the file dialog. – Patrick Desjardins Jun 08 '09 at 13:11
  • okay - i remembered what the facebook uploader looked like just after i asked the question - do'h. if someone did open 100 files, you would be reading in the bytes of those 100 files locally. you can then choose to send those bytes later on. – russau Jun 08 '09 at 13:43

1 Answers1

1

If you don't want to use the open file dialog, then I would say that there are no way, if there were, it would be a bug - a security hole in the sandbox.

Richard Szalay
  • 83,269
  • 19
  • 178
  • 237
HackerBaloo
  • 397
  • 2
  • 11
  • I am searching a secure way to do it. I do not care to prompt a user notification or to sign a certificat or what ever it requires. Java do it and I think Flash do it with the latest version... why not Silverlight ;) – Patrick Desjardins Jun 08 '09 at 13:12
  • There is no way to do it, indeed. This has just not been a very high priority. Very few applications need this functionality and Microsoft has more pressing needs. If you have a relevant business case, feel free to get in touch with them and describe your problem. They certainly listen to feedback, although I imagine it'll be too late to get anything into SL3. – Sander Jun 08 '09 at 13:14
  • Flash cannot do it. AIR can, but it requires that the user installs the application first (which requires elevation on Vista/7). – Richard Szalay Sep 17 '09 at 14:41