Bug 25886

Summary: No way to store File objects locally
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: annevk, ap, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Bug Depends on: 25887    
Bug Blocks:    

Description Eric Seidel (no email) 2009-05-20 00:41:14 PDT
No way to store File objects locally

If you try using Database, it will just store the string "[File Object]".  At least that's what I've been told (and looks like what it will do in JSSQLTransactionCustom.cpp:

http://trac.webkit.org/browser/trunk/WebCore/bindings/js/JSSQLTransactionCustom.cpp#L77

This is a blocking bug for applications like Gmail to move off gears (which they would like to do!).  They need a way to store files that someone attaches to an email during offline mode, so they can upload them to the server when you come back online.
Comment 1 Eric Seidel (no email) 2009-05-20 00:44:15 PDT
Alexey suggests that it also makes sense to be able to fetch files out of a Database as some sort of data: url.  So you can store images in the Database and display them later.  I think that's most easily answered by adding some sort of File::toDataURL() function (which probably should take an encoding).  I'll file that as a separate bug.
Comment 2 Anne van Kesteren 2023-08-23 07:43:30 PDT
This bug has clearly been overtaken by events.