flex mobile - fastest way to load local file? - air

I'm gonna load local files in Flex mobile environment.
there are so many ways to load local files in Flex mobile.
URLLoader(URLLoaderDataFormat.BINARY), Loader, URLStream, FileStream etc.
so, what will be the fastest way to load local files in Flex mobile? (android)
I'll be waiting nice answer. thanks :)

You are talking about "local" files, so there is no internet connection required I assume?
In that case have a look at the File class > http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html
Then use FileStream to read the local file.

Related

How to read files from anywhere with vue.js

I am trying to read files from my music directory on my PC.
I have tried doing it with the node.js file system module, but it is not working. How do I get it to work?😢
Just a late follow-up. It is possible to read and write files using HTML5 with the FileReader and saveAs(). The browser will open a file dialogue and let the user choose the file, so the user is aware of the file access. It is not possible to read or write to a file without the user's attention.
https://developer.mozilla.org/en-US/docs/Web/API/FileReader
As said by #flame in a comment, it's just impossible, because the browser never have access to the visitor's disk (do you imagine the security issue if it was the case ?).
Vue.js is a Front-end framework, so the application it produces only have access to what the browser has access to.

Storing files locally in Node Webkit App

Folks:
I'm creating an app using Node Webkit. The purpose of this app is to display images and pdfs. The app needs to download those files from a central repository, and cache them locally. When the app runs offline, the files should still be available, and displayed.
On the face of it, this sounds like appcache is the answer - and that indeed is where I was heading when this was a pure webapp in a browser. However, now I've discovered node-webkit, and here we are.
node-webkit's GitHub wiki states:
"However, application cache is designed for browser use, for apps using node-webkit, it's less useful than the other two method, read HTML5 Application Cache if you want to use it."
But doesn't say why.
I've also researched node.js filesystem - but that seems like a whole magnitude of complexity above what I need.
Can anyone point me in a sensible direction?
Thanks.
It has to do with the nature of App Cache itself.
You specify a manifest file that lists all the static assets required for your app to run offline. You don't have any programmatic access to the cache to add and remove files via JS.
So for a node-webkit app, it'd make more sense to fetch these files and store them in the Application Support folder (Or AppData, depending on the platform). That's where the node.js part is really useful, the file IO stuff.

How to access the file system in chrome os

Is it possible to have an extension read/write to/from the local file system in chrome os?
Thanks in advance?
Yes - you can read/write with the File API:
http://www.html5rocks.com/en/tutorials/file/filesystem/
and you can even hook up your extension to the file system. I've wrote about it: http://greenido.wordpress.com/2011/06/02/chrome-apps-web-store-and-the-new-chromeos-file-api/
It sounds like you want to access the root parent directory. In order to do that you'll have to put your chromebook into developer mode, and when signing in enable debugging options. That will give you the option to view and edit chromeos system files. Just be careful and make sure you create a recovery disc first.
Sure, you can use the standard File API, but chrome provides its own proprietary fileSystem API which, in my opinion, is much easier: https://developer.chrome.com/apps/fileSystem

iPhone zip files load?

Please give me idea, How I can load a zip file to the iPhone document folder through the standard means of. I need periodically to load the zip file produced by the some Windows application. Maybe with help of iTunes?
It should work as read the zip file and update some view on my iPhone app. There is no WiFi connection or internet connection, only connection with computer.
To enable File Sharing in your app, you simply set the boolean flag “UIFileSharingEnabled” in your info.plist.
Read Ray's this post for more info - http://www.raywenderlich.com/1948/how-integrate-itunes-file-sharing-with-your-ios-app

Where to save the uploaded files?

I am developing a web application to upload .mp3 files and need to play them. I successfully uploaded the files and saving them in C:/uploads folder. I understand that as it's a web application we need to save them in the Apache web server it self. But I am not sure, where to save them.
Thanks,
Serenity.
You can use content repositories to store uploaded data, I think this is common approach. For instance, take a look at the Apache JackRabbit CR, applying it you won't easy look for uploaded files on hard drive, but you will have web interface, and also some other tools available to connect to repository and show you files there etc.
As alternative to JackRabbit, you can try Alfresco CMS, they both implement JCR, other implementations are listed here (you will them at the bottom of that page).