Impossible to do real offline persistent storage of large amount of files > 500mb because of Blob limitations?

61 views
Skip to first unread message

Lasse

unread,
Oct 23, 2015, 6:29:36 AM10/23/15
to Chromium Apps
Hello

I am trying to make an offline cache by fetch()'ing files from a webserver, converting them to blob's and then saving them to a user chosen directory using the FileSystem API. However this seems to be a non viable approach to this task. First problem, loading many files at once as blobs quickly hit's the 500 mb limit, and as far as I can tell there is no way load say a locally downloaded image and display it in the app without loading it as a Blob using something like: window.URL.createObjectURL(file)

Can this really be the case or am I missing some obvious feature / API of chrome apps that makes this scenario possible?

If not, then I don't see how it's possible to make large amounts of say video-content available offline for chrome apps, without bundling them directly in the packaged app payload?

Lasse

unread,
Oct 30, 2015, 10:13:26 AM10/30/15
to Chromium Apps
Nobody knows?

Paul Canning

unread,
Oct 30, 2015, 12:00:39 PM10/30/15
to Lasse, Chromium Apps
Is "filesystem:chrome-extension://<app_id>/persistent" not usable anymore?

Nobody knows?
--
You received this message because you are subscribed to the Google Groups "Chromium Apps" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-app...@chromium.org.
To post to this group, send email to chromi...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-apps/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.



--
---------------------------------
Paul Canning
[ software artist ]
---------------------------------
[draw&code]  
digital creative studio

---------------------------------

Arthur

unread,
Oct 30, 2015, 5:19:43 PM10/30/15
to Chromium Apps
For saving large blobs, you need to save them segment by segment. Create a FileWriter, call truncate(size) to allocate a big chunk first. Then for each downloaded blob, create a FileWriter and call seek(offset) to navigate to the correct offset, and write the blob. Repeating the process can get your large file saved correctly on filesystem://.
Reply all
Reply to author
Forward
0 new messages