html5-filesystem

Cordova Meteor app not allowed to load local resource

北城余情 提交于 2019-12-05 03:51:21
问题 I'm working on a Meteor Cordova app which needs to work offline. I'm using ground:db to cache my data offline, which works fine, except for images. I have an image collection using collectionFS. Since these images need to be available when offline, I developed some kind of local sync which observes the image collection, and when some image gets added or changed, downloads the image to the local storage using cordova filesystem and filetransfer. I keep track of the downloaded images in a

Saving Huge Files

寵の児 提交于 2019-12-05 02:48:37
问题 I need to save a file of unknown size, potentially multiple gigabytes, in JS. The data source is a mediastream captured using mediarecorder. In Chrome, this can be accomplished using the filesystem and filewriter apis with filesystem: urls by writing blob chunks to a fileentry as they are received, then setting a download link to the file url. However, I cannot find a way to do this in Firefox or Edge (whenever it gets mediarecorder). 回答1: This works for me in Firefox: navigator.mediaDevices

Where is the filesystem in html5 stored on the real file system?

为君一笑 提交于 2019-12-04 16:56:15
If I use JavaScript to create a file on a HTML5 Filesystem, can I find it on the real file system of my computer? originally I think all file is stored on a virtual file system , so files can be protected. but it's not. for chrome, file is placed at "C:\Users\user name\AppData\Local\Google\Chrome\User Data\Default\File System" with obfuscated name on windows 7. so you can operate on it as local file. 来源: https://stackoverflow.com/questions/11719816/where-is-the-filesystem-in-html5-stored-on-the-real-file-system

Javascript file dropping and reading directories - Asynchronous Recursion

戏子无情 提交于 2019-12-04 15:09:10
So I'm trying to create a file dropper web application. Right now, a user can drop files on the screen and I can read them, including all the files in a directory that was dropped. But, I don't know when the script is done reading the files. Some code: This first function handles a 'drop' event and will loop through each file and send it to another function that will read its contents. function readDrop( evt ) { for( var i = 0; i < evt.dataTransfer.files.length; i++) { var entry = evt.dataTransfer.items[i].webkitGetAsEntry(); if(entry) readContents(entry, ""); } //Do stuff after all files and

Cordova Meteor app not allowed to load local resource

三世轮回 提交于 2019-12-03 20:50:04
I'm working on a Meteor Cordova app which needs to work offline. I'm using ground:db to cache my data offline, which works fine, except for images. I have an image collection using collectionFS. Since these images need to be available when offline, I developed some kind of local sync which observes the image collection, and when some image gets added or changed, downloads the image to the local storage using cordova filesystem and filetransfer. I keep track of the downloaded images in a client-side collection. When using an image in the a template, I check if the image exists locally. If so, I

Saving Huge Files

旧街凉风 提交于 2019-12-03 17:07:48
I need to save a file of unknown size, potentially multiple gigabytes, in JS. The data source is a mediastream captured using mediarecorder. In Chrome, this can be accomplished using the filesystem and filewriter apis with filesystem: urls by writing blob chunks to a fileentry as they are received, then setting a download link to the file url. However, I cannot find a way to do this in Firefox or Edge (whenever it gets mediarecorder). This works for me in Firefox: navigator.mediaDevices.getUserMedia({ video: true }) .then(stream => record(stream, 5000) .then(recording => { stop(stream); video

Huge JavaScript HTML5 blob (from large ArrayBuffers) to build a giant file in client side

拟墨画扇 提交于 2019-12-02 20:39:59
I'm writing a web browser app (client-side) that downloads a huge amount of chunks from many locations and joins them to build a blob. Then that blob is saved to local filesystem as a common file. The way I'm doing this is by mean of ArrayBuffer objects and a blob. var blob = new Blob([ArrayBuffer1, ArrayBuffer2, ArrayBuffer3, ...], {type: mimetype}) This works ok for small and medium-sized files (until 700 MB aprox), but browser crashes with larger files. I understand that RAM memory has its limits. The case is that I need to build the blob in order to generate a file, but I wanna allow users

How to get file creation date on browser using javascript or jquery

[亡魂溺海] 提交于 2019-12-02 12:02:19
问题 I need to find out the file creation date and file last modified date while uploading the xls file, I have to do some calculation on this 2 dates. By using below code I can easily get file last modified date. $('#userfile').bind('change', function() { //this.files[0].size gets the size of your file. alert((this.files[0].lastModifiedDate)); alert((this.files[0].DateCreated)); $file_full_path =this.files[0].mozFullPath; alert(alert); }); I am not able to find out the the file creation date. can

Can't fit file encoding when working with Chrome File System API

笑着哭i 提交于 2019-12-02 08:00:49
问题 I need to read a file which contains a group of symbols moved 65 in ASCII table. It means, for each symbol I am meant to do: String.fromCharCode('¢'.charCodeAt(0)-65) // returns 'a' But it is not working at all. I have asked friends of mine to do the test using Python inputting the same file and they got the correct result. When I try to do the same work with Chrome File System it does not work at all. I can't get back the expected symbols. I think it is a problem with my encoding/charset

How to get file creation date on browser using javascript or jquery

那年仲夏 提交于 2019-12-02 04:42:48
I need to find out the file creation date and file last modified date while uploading the xls file, I have to do some calculation on this 2 dates. By using below code I can easily get file last modified date. $('#userfile').bind('change', function() { //this.files[0].size gets the size of your file. alert((this.files[0].lastModifiedDate)); alert((this.files[0].DateCreated)); $file_full_path =this.files[0].mozFullPath; alert(alert); }); I am not able to find out the the file creation date. can anybody please help me. I have also tried it via php but it is not possible via php because php doesn