Skip to main content

Microsoft Silverlight

Unanswered Question Downloading or uploading content into a file using SilverlightRSS Feed

(0)

chris12345
chris12345

Member

Member

2 points

2 Posts

Downloading or uploading content into a file using Silverlight

I understand IsolatedStorage but for my application I need to read and write from the local computers filesystem. 

 Is there a mechanism to elevate the privs of a sliverlight app?  I'm totally fine with the user getting a pseudo LUA screen or whatever,  what can I do?

 for my application I need to be able to read/write/seek inside the file

 

thanks!

jackbond
jackbond

Contributor

Contributor

2818 points

724 Posts

Re: Downloading or uploading content into a file using Silverlight

If you are using 1.1, there is a file open dialog that gives you a stream to read the contents of the file. In the current version, if you want to save a file to the local file system, you have to upload it to the server, and then provide a download link.

Psychlist1972
Psychlis...

Contributor

Contributor

6040 points

973 Posts

MicrosoftModerator

Re: Downloading or uploading content into a file using Silverlight

If you are targeting windows-only, use WPF. You'll get more capabilities (such as local access, if your app falls into the correct zones).

If cross-platform, I agree with the previous poster.

Pete

Silverlight.net Moderator
MVP: Silverlight, Silverlight Insider
Author: Silverlight in Action, 2nd Edition
POKE 53280,0 - My Blog

Opinions are my own. Oh, and I don't work for Microsoft.

jrpowers
jrpowers

Member

Member

72 points

26 Posts

Re: Re: Downloading or uploading content into a file using Silverlight

I agree that this feature is much-needed.  We recently wrote a tool that manipulates images in-browser before upload.

In Firefox, you can use the data:uri specification to display certain types of files (HTML, text, images) which the user can then right-click and Save locally.

With Silverlight 1.1, we're given the power to perform substantial file manipulation client-side, it only makes sense that we are able to do something with these files other than relaying them back to the client through servers. I haven't been able to identify a way to do this with Flash, either, so this would give Silverlight a chance to innovate.

The security implications would be the same as downloading a file from a server.

jackbond
jackbond

Contributor

Contributor

2818 points

724 Posts

Re: Re: Downloading or uploading content into a file using Silverlight

From some of the posts here, I don't think people realize how important a feature a FileSave dialog is. Fortunately, it looks like the Silverlight team is aware of it. See, http://blogs.msdn.com/shrib/archive/2007/09/25/saving-a-file-to-the-local-disk-in-silverlight.aspx

luisabreu
luisabreu

Participant

Participant

1676 points

612 Posts

Re: Re: Downloading or uploading content into a file using Silverlight

hello.

well, i can agree with it...it's also important to change the way the current file dialog used for opening files works since it really isn't well integrated with the existing controls...

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities