Page view counter
Ability to save to the local file system - Not protected storage
Last post 02-25-2008 9:57 AM by FredHirschfeld. 11 replies.
Sort Posts:
08-30-2007 2:58 AM
Ability to save to the local file system - Not protected storage

I'm hoping someone from Microsoft will respond to this question. Is there any intent to provide a FileSaveDialog that would return an output stream for saving a file outside of protected storage? Essentially the reverse of the OpenFileDialog. This functionality would be extremely useful in numerous situations.

Jack Bond

Khet - The first Silverlight multiplayer game

Zork I: The Great Underground Empire

jackbond

Loading...
Joined on 03-21-2007
Posts 429
08-31-2007 6:39 PM
Re: Ability to save to the local file system - Not protected storage

Silverlight is sandboxed on purpose and is unlikely to change. Same as any web site. If you want Silverlight to have this ability, can you imagine how it could be used for nefarious uses (e.g. crooks)? I hope they don't allow this.

(If this has answered your question, "Mark as Answer")

Shawn Wildermuth
C# MVP, MCSD, Speaker and Author

Silverlight 2 Workshop
November 19-21, 2008 - Seattle, WA
December 1-3, 2008 - Dallas, TX
http://silverlight-tour.com

swildermuth

Loading...
Joined on 10-13-2003
Atlanta, GA
Posts 1,246
08-31-2007 6:56 PM
Re: Ability to save to the local file system - Not protected storage

swildermuth:
Silverlight is sandboxed on purpose and is unlikely to change. Same as any web site. If you want Silverlight to have this ability, can you imagine how it could be used for nefarious uses (e.g. crooks)? I hope they don't allow this.

How is it any different than when a browser pops up the "Save As" dialog when a user has chosen to download a file? At that point the user has the option to save or cancel. Silverlight 1.1 already has the FileOpenDialog(which is presumably far more dangerous). I'm simply wanting to generate some content and give the user the ability to save the file outside of protected storage. Say I implemented a specialized photo editor, and wanted to allow the user to save their work, how do I give the user a choice of where to save it? Protected storage isn't really meant for this kind of situation. So, bottom line, I can't imagine how it could be used for nefarious uses.

Jack Bond

Khet - The first Silverlight multiplayer game

Zork I: The Great Underground Empire

jackbond

Loading...
Joined on 03-21-2007
Posts 429
09-25-2007 7:28 PM
Re: Ability to save to the local file system - Not protected storage

See http://blogs.msdn.com/shrib/archive/2007/09/25/saving-a-file-to-the-local-disk-in-silverlight.aspx for a work around until SaveFileDialog gets added to Silverlight. The Silverlight team is looking into adding this support.

shri_borde

Loading...
Joined on 09-25-2007
Posts 2
09-29-2007 5:55 AM
Re: Re: Ability to save to the local file system - Not protected storage

If you're working with Silverlight 1.1, you can always call a script to pop-up a "Save As" dialog. 

(If this has answered your question, "Mark as Answer")

Shawn Wildermuth
C# MVP, MCSD, Speaker and Author

Silverlight 2 Workshop
November 19-21, 2008 - Seattle, WA
December 1-3, 2008 - Dallas, TX
http://silverlight-tour.com

swildermuth

Loading...
Joined on 10-13-2003
Atlanta, GA
Posts 1,246
09-30-2007 10:05 PM
Re: Re: Ability to save to the local file system - Not protected storage

swildermuth:
If you're working with Silverlight 1.1, you can always call a script to pop-up a "Save As" dialog. 

Where's that?

Jack Bond

Khet - The first Silverlight multiplayer game

Zork I: The Great Underground Empire

jackbond

Loading...
Joined on 03-21-2007
Posts 429
10-01-2007 1:38 AM
Re: Re: Re: Ability to save to the local file system - Not protected storage

You can pop up a "Save As" dialog with Javascript, and save the contents of the HTML page.  Maybe that's what he's referring to?

...but, that's not Silverlight 1.1-specific.

jrpowers

Loading...
Joined on 09-21-2007
Posts 26
10-03-2007 5:15 AM
Re: Re: Re: Re: Ability to save to the local file system - Not protected storage

Yup, that's what I meant.  You can call script from 1.1.

(If this has answered your question, "Mark as Answer")

Shawn Wildermuth
C# MVP, MCSD, Speaker and Author

Silverlight 2 Workshop
November 19-21, 2008 - Seattle, WA
December 1-3, 2008 - Dallas, TX
http://silverlight-tour.com

swildermuth

Loading...
Joined on 10-13-2003
Atlanta, GA
Posts 1,246
02-25-2008 4:29 AM
Re: Re: Re: Re: Ability to save to the local file system - Not protected storage

Can I Save Images which are in Canvas Control using javascript to the local file system 

krishnakiran.k

Loading...
Joined on 02-22-2008
Posts 37
02-25-2008 4:38 AM
Re: Re: Re: Re: Ability to save to the local file system - Not protected storage

krishnakiran.k:

Can I Save Images which are in Canvas Control using javascript to the local file system 

Maybe in 2.0 beta, but the 1.1/2.0 alpha doesn't support any access to the local file system (outside of protected storage) or the ability to export the current contents of a Canvas to an image. Based on the number of requests for both these features, I'd be surprised if they didn't make it into the upcoming release.

Jack Bond

Khet - The first Silverlight multiplayer game

Zork I: The Great Underground Empire

jackbond

Loading...
Joined on 03-21-2007
Posts 429
02-25-2008 5:21 AM
Re: Re: Re: Re: Ability to save to the local file system - Not protected storage

Are you able to save any data using Javascript.. i belive no... then you are not able to save any data on the client..

client system is always restricted to read and write...

"If this helps you then mark it as answered"

Ravi Kant Srivastava
(Application Developer)
Scope Technology
India/South Africa

bluearc

Loading...
Joined on 12-20-2007
India/South Africa
Posts 325
02-25-2008 9:57 AM
Re: Re: Re: Re: Ability to save to the local file system - Not protected storage

I doubt this is what you are looking for BUT on the open file dialog the open button has a drop down that allows you to "Open for write" which I would presume that you could then change the contents of a file that they user granted access to... I have not tested to see if it works but did notice it was there.

 
Fred Hirschfeld
(If this answers your question please select "Mark as Answered")

FredHirschfeld

Loading...
Joined on 02-03-2008
Tacoma
Posts 158
Microsoft Communities