FileSaver support

205 views
Skip to first unread message

Jon Taylor

unread,
Apr 20, 2011, 3:32:10 AM4/20/11
to Chromium HTML5
Hi,

I was wondering if anyone knew about the current status of
implementing FileSaver support. There doesn't appear to much
information about it on the web.

Is it slow to come through due to security concerns? If so Flash has
had this capability for a while and it doesn't seem to have caused any
issues.

Thanks for your time.

Jon.

Eric Uhrhane

unread,
Apr 20, 2011, 1:30:12 PM4/20/11
to Jon Taylor, Chromium HTML5
On Wed, Apr 20, 2011 at 12:32 AM, Jon Taylor <j...@stackhaus.com> wrote:
> Hi,
>
> I was wondering if anyone knew about the current status of
> implementing FileSaver support. There doesn't appear to much
> information about it on the web.

It's not implemented anywhere yet. There are a couple of details of
the spec that haven't quite been settled yet, so it'll probably be a
little while before anyone implements it.

> Is it slow to come through due to security concerns? If so Flash has
> had this capability for a while and it doesn't seem to have caused any
> issues.

It's not a security issue; we've just been busy with other things.

> Thanks for your time.
>
> Jon.
>

> --
> You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
> To post to this group, send email to chromiu...@chromium.org.
> To unsubscribe from this group, send email to chromium-html...@chromium.org.
> For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/?hl=en.
>
>

Jordon Wii

unread,
Apr 20, 2011, 10:48:17 PM4/20/11
to Chromium HTML5
> > I was wondering if anyone knew about the current status of
> > implementing FileSaver support. There doesn't appear to much
> > information about it on the web.
>
> It's not implemented anywhere yet.  There are a couple of details of
> the spec that haven't quite been settled yet, so it'll probably be a
> little while before anyone implements it.

I'm just thankful that I'm writing apps for a browser that _will_
implement it. =D

So ATM, is there any way to download a file that's in the local
filesystem to the user's computer ? In my app, I've got a files
stored in the HTML5 FS and I have to send them to the server to allow
them to be downloaded...which seems somewhat strange. I suppose
that's exactly what this API is for, right? I don't know much about
it.

Kinuko Yasuda

unread,
Apr 20, 2011, 10:56:32 PM4/20/11
to Jordon Wii, Chromium HTML5
Hi Jordon,

I guess this slide may help.  (In chromium you need to call window.webkitURL.createObjectURL instea of winow.URL.createObjectURL)

Jordon Wii

unread,
Apr 20, 2011, 10:59:25 PM4/20/11
to Chromium HTML5
Ah, thanks Kinuko. I'd forgotten about that.

The only issue with that is that the filename is a UUID and not the
file's actual name. I suppose that'll be ok for now, though.

On Apr 20, 7:56 pm, Kinuko Yasuda <kin...@chromium.org> wrote:
> Hi Jordon,
>
>
>
>
>
>
>
>
>
> On Thu, Apr 21, 2011 at 11:48 AM, Jordon Wii <jordon...@gmail.com> wrote:
> > > > I was wondering if anyone knew about the current status of
> > > > implementing FileSaver support. There doesn't appear to much
> > > > information about it on the web.
>
> > > It's not implemented anywhere yet.  There are a couple of details of
> > > the spec that haven't quite been settled yet, so it'll probably be a
> > > little while before anyone implements it.
>
> > I'm just thankful that I'm writing apps for a browser that _will_
> > implement it. =D
>
> > So ATM, is there any way to download a file that's in the local
> > filesystem to the user's computer ?  In my app, I've got a files
> > stored in the HTML5 FS and I have to send them to the server to allow
> > them to be downloaded...which seems somewhat strange.  I suppose
> > that's exactly what this API is for, right?  I don't know much about
> > it.
>
> I guess this slide may help.  (In chromium you need to call
> window.webkitURL.createObjectURL instea of winow.URL.createObjectURL)http://html5-demos.appspot.com/static/addoncon2010/index.html#slide36
>
>
>
>
>
>
>
>
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium HTML5" group.
> > To post to this group, send email to chromium-ht...@chromium.org.
> > To unsubscribe from this group, send email to
> > chromium-html5+unsubscr...@chromium.org.

Jordon Wii

unread,
Apr 20, 2011, 11:10:05 PM4/20/11
to Chromium HTML5
For future reference...

If you utilize the same technique in the slide you provided but use a
filesystem: URL rather than a Blob URL, the filename will be
preserved.

Problem solved. =D

Kinuko Yasuda

unread,
Apr 20, 2011, 11:23:05 PM4/20/11
to Jordon Wii, Chromium HTML5
Oh yeah, filesystem: URL is a really nice recent addition.


--

Jordon Wii

unread,
Apr 20, 2011, 11:27:11 PM4/20/11
to Chromium HTML5
True. With the exception of crbug.com/79539 (which was fixed very
quickly; thanks guys), they're proving very useful.

On Apr 20, 8:23 pm, Kinuko Yasuda <kin...@chromium.org> wrote:
> Oh yeah, filesystem: URL is a really nice recent addition.
>
>
>
>
>
>
>
> On Thu, Apr 21, 2011 at 12:10 PM, Jordon Wii <jordon...@gmail.com> wrote:
> > For future reference...
>
> > If you utilize the same technique in the slide you provided but use a
> > filesystem: URL rather than a Blob URL, the filename will be
> > preserved.
>
> > Problem solved. =D
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium HTML5" group.
> > To post to this group, send email to chromium-ht...@chromium.org.
> > To unsubscribe from this group, send email to
> > chromium-html5+unsubscr...@chromium.org.

Eric Bidelman

unread,
Apr 21, 2011, 12:09:11 AM4/21/11
to Jordon Wii, Chromium HTML5
Jordon, do you have a code snippet for that?

I'm seeing the content show up in the iframe when a filesystem: URL, 
rather than triggering the download manager.

To post to this group, send email to chromiu...@chromium.org.
To unsubscribe from this group, send email to chromium-html...@chromium.org.



--
Eric Bidelman
Developer Relations - Google
e.bid...@google.com

Jordon Wii

unread,
Apr 21, 2011, 12:16:58 AM4/21/11
to Chromium HTML5
Heh, right as I saw this email, I noticed that it doesn't work with
files wit recognized file types (e.g. HTML, CSS, JS, TXT...). The
file I was testing was just called LICENSE.

Curses.
> Eric Bidelman
> Developer Relations - Google
> e.bidel...@google.com
Reply all
Reply to author
Forward
0 new messages