Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Ability to save to the local file system - Not protected storage
12 replies. Latest Post by dlchambers on September 22, 2009.
(0)
jackbond
Contributor
2806 points
722 Posts
08-30-2007 2:58 AM |
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.
swildermuth
Star
8320 points
1,546 Posts
08-31-2007 6:39 PM |
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.
08-31-2007 6:56 PM |
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.
shri_borde
Member
4 points
2 Posts
09-25-2007 7:28 PM |
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.
09-29-2007 5:55 AM |
If you're working with Silverlight 1.1, you can always call a script to pop-up a "Save As" dialog.
09-30-2007 10:05 PM |
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?
jrpowers
72 points
26 Posts
10-01-2007 1:38 AM |
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.
10-03-2007 5:15 AM |
Yup, that's what I meant. You can call script from 1.1.
krishnak...
33 points
37 Posts
02-25-2008 4:29 AM |
Can I Save Images which are in Canvas Control using javascript to the local file system
02-25-2008 4:38 AM |
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.
bluearc
Participant
1500 points
325 Posts
02-25-2008 5:21 AM |
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"
FredHirs...
928 points
165 Posts
02-25-2008 9:57 AM |
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.
dlchambers
2 points
1 Posts
09-22-2009 11:08 AM |
This does save to disk: http://www.livegeometry.com/