|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
internalSave with AutoChosen?
Hi,
I'm working on a firefox 2.0+ extension that creates and then saves the contents of a canvas. It works fine, but I can't seem to get it save the image (via the internalSave function in contentAreaUtils.js) without popping up the save file picker dialog. Shouldn't setting the AutoChosen file prevent the dialog from appearing? I've spent all day trying to get this to work, so any suggestions would be really appreciated. Here's the relevant code: var localfile = Components.classes["@mozilla.org/file/local;1"]. createInstance() localfile.initWithPath("c:\\image.jpg"); var localuri = makeFileURI(localfile); internalSave(canvas.toDataURL('image/jpeg','quality=100'), null, 'image.jpg', null, 'image/jpeg', true, null, AutoChosen(localfile, localuri), null); Thanks, Dan dev-tech-xul mailing list dev-tech-xul (AT) lists (DOT) mozilla.org |
|
#2
|
|||
|
|||
|
Quote:
Hi,Dan I'm also in this trouble, in my codes the AutoChosen function retruns "undefined", So, it's unuseable , but how to make it non-null? sorry for my poor english alva |
![]() |
| Viewing: Web Development Archives > Mailing Lists > Mozilla > internalSave with AutoChosen? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|