Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,810 members, 7,956,071 topics. Date: Monday, 23 September 2024 at 12:06 AM |
Nairaland Forum / Science/Technology / Programming / Writing Into A Local File From A Browser Using The HTML5 File System Api-help Me (4252 Views)
Joomla Spc4 API Help / Sage OS (HTML5) : The Development (with download link) / J2me, Pdf Api Help (2) (3) (4)
Writing Into A Local File From A Browser Using The HTML5 File System Api-help Me by Nobody: 10:52am On May 18, 2013 |
Hi, I read through the HTML5 filesystem API, copied and tried to run the code I saw for creating and writing to files from browsers, but it still wouldn't work. I have checked different questions on stackoverflow.com and tried out the different suggestions they had... no results. (The codes for the project I am working on will be run on from users local servers so I am using only Javascript). Please is there someone here who successfully wrote into local files from a browser using javascript?? I have pasted my very short code in the link below and was wondering if someone could look at it and help me out... or better still you can just tell me exactly what you did to generate and write to files on your local computer. I have completed almost everything on this project and this is the only part remaning. Thanks for you help! ps: I am new to web programming so please ignore some of the mistakes I may have made up there... |
Re: Writing Into A Local File From A Browser Using The HTML5 File System Api-help Me by Nobody: 1:27pm On May 18, 2013 |
please say something if you can help... |
Re: Writing Into A Local File From A Browser Using The HTML5 File System Api-help Me by Javanian: 3:01pm On May 18, 2013 |
Can i know what you are trying to acheive with this? writing to files from a web/browser application would be difficult due to security issues. |
Re: Writing Into A Local File From A Browser Using The HTML5 File System Api-help Me by Nobody: 3:22pm On May 18, 2013 |
yes, from my experience with adobe flash and java applets your user needs extended privilege to be able to write to the local file system in both cases, you have to code in a way that lets your user accept the the extended privilege required. I am sure html5 wont be an exception. try google |
Re: Writing Into A Local File From A Browser Using The HTML5 File System Api-help Me by Nobody: 10:33pm On May 18, 2013 |
Thanks Guys... I am trying to make modifications to the google-voice-speech to text source code here: http://www.google.com/intl/en/chrome/demos/speech.html I want a situation whereby I can have voice transcriptions written to a local file while it is being displayed online. After searching online, I successfully found a way to directly download any voice transcription made after a speaker has finished talking. My project partner however is not satisfied with this because what we want is to be able to write to files directly while the speaker is still talking. From what I got here: http://www.html5rocks.com/en/tutorials/file/filesystem/, it seems like it's possible to directly write to local files from chrome browser using this demo as an example: function onInitFs(fs) { fs.root.getFile('log.txt', {create: true}, function(fileEntry) { // Create a FileWriter object for our FileEntry (log.txt). fileEntry.createWriter(function(fileWriter) { fileWriter.onwriteend = function(e) { console.log('Write completed.'); }; fileWriter.onerror = function(e) { console.log('Write failed: ' + e.toString()); }; // Create a new Blob and write it to log.txt. var blob = new Blob(['Lorem Ipsum'], {type: 'text/plain'}); fileWriter.write(blob); }, errorHandler); }, errorHandler); } window.requestFileSystem(window.TEMPORARY, 1024*1024, onInitFs, errorHandler); [i][/i] I haven't been able to make this work and would be glad to get help from anyone with more web programming experience. I have only worked on projects not involving the web so far and this is my first time delving into it. |
(1) (Reply)
Why Is Rails Adoption So Slow In Nigeria? / Programmer In Bank Vs Programmer In Another Coperate Environment / Wordpress Plugin Development Tutorial
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 13 |