We are designing an internal web application to which we would like to upload a very large file (100mb). Is an HTML file upload even an option here?
If it is not, what other tools (Java applet, Silverlight, Flash) could we use to perform a file upload this large? Is uploading a file this large practical at all?
Edit: You can assume that there will be appropriate server side code accepting the file upload and handling the data. This question is specifically about the client side interface and the HTML file upload interface.
I'm no expert on file uploading, but my understanding is it's either impossible or very difficult to upload a file with HTML alone. You will probably need some server-side scripting like PHP, JSP, ASP.NET or something to process the upload and persist the file on your web server/database. Any well-designed implementation should allow for a size limit to be set and enforced, but with larger files it would be a good idea to include a progress indicator like a percentage and/or progress bar so the user knows the upload is still working and isn't hanging on slow connections.
I just downloaded this UploadBean component and deployed the WAR under the downloads section on an apache tomcat instance and the SimpleUpload.jsp example worked really well right out of the box. If you're using Java I'd highly recommend this approach.
http://www.javazoom.net/jzservlets/uploadbean/uploadbean.html
with javascript/jQuery/Mootools/Flash there are plugins that allows you to check file size before upload, and basically has server side script as fallback validation as well. Take a look at jQuery Uploadify or Mootools powered fancy upload they use flash and javascript with server side script in the backend. These two plugins use flash + JavaScript on client side
Being that it will be for an internal web application I am assuming you don't have any server-side imposed limits on the server that will be running this. If not then you should be able to upload large files.
See http://www.uploadify.com/ - nice and easy to implement
See http://encodable.com/filechucker/ - good if you are looking for more advanced management for your uploaded files.
Related
I wanted to build a web application that kids could view 4-H Record Book forms, criteria, and examples from a CD. I wanted it to be in a web page format so that it was platform-independent (compatible with Windows, Mac, and Linux). I wanted to write the application in ASP.NET, so that I could reuse pieces of my site (e.g. Master Pages, databound controls). It worked fine while in Debug mode running on my simulator server, but when I attempted to open the files without the server simulator, they simply displayed as blank pages.
I've learned thus far that ASP.NET requires a server to run, but my question is: why does it require a server when so much of ASP.NET is just HTML tags? Also, is there any way I can use ASP.NET features such as Master Pages and Databound controls on a local website?
Output of ASP.NET is html, css and other stuff, but ASP.NET itself is a very complex system that consists of many components, for instance code-behind classes, asp.net controls, event system, routing system, various libraries etc. The server has to somehow (I won't go into details, because it's a way too broad topic to explain like this) assemble the output and it will spit out the generated html, css etc. to the client who requested the file (typically a browser).
Browser itself can only work with final html, css, javascript and so on, but it can't do processing that needs to take place on the server-side.
As a part of flash application, I'm trying to store recorded files automatically to a specific path on users computer hard disk without they be aware.
Is there a way to create directory in actionscript?
If you are using Flash in a web browser, for security reasons there is not. the only option to store something locally within a web browser is to use shared objects (kind of like cookies), but this is likely not what you want.
If you are not in a web browser you can use either AIR or a third party wrapper such as Multidmedia Zinc (for an additional cost).
File options for AIR can be found here:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html
File options for Zinc can be found here:
http://www.multidmedia.com/support/livedocs/zinc/4.0/
EDIT
Since in your comment it sounds like your running in a web browser, you should leave it at simply streaming it to your server. If they have no internet connection there is no other good option other than live streaming using URLRequest, that is, if you are within a web browser.
Here is some additional reading on this subject:
Can Flash action script read and write local file system?
There's a tutorial at http://hub.tutsplus.com/tutorials/create-a-useful-audio-recorder-app-in-actionscript-3--active-5836?request_uri=%2Ftutorials%2Factionscript%2Fcreate-a-useful-audio-recorder-app-in-actionscript-3 which does exactly what you want. Ignore the timeline-driven approach if you wish.
It uses the micrecorder library from https://code.google.com/p/micrecorder/ which records the audio and offers a file for the user to download at the end.
I am building an app in AIR/AS3 for iOS and Android which requires user information to be submitted and stored in a remote DB. I guess I will need to build a register/sign in screen but just wondering what the best method to store the session information in the app.
I would like it that if the user closes the app the session remains when they start it again. I currently have suspend on exit in the app.xml file. Should I just remove this?
Cheers
Probably worth giving a flip through of this for some high level ideas (without the seminar it's difficult to get details out of this)
http://www.slideshare.net/marcocasario/local-persistent-data-with-actionscript-3-and-air
If you're using Flex I'd suggest starting here:
http://help.adobe.com/en_US/flex/mobileapps/WSb0a29bf92525419c-54dd253312afbec3ecb-8000.html
Otherwise either using the File/FileStream classes and an XML file or the SQLite options are both good as well depending on what you need to save/restore and how you'll be working with the data.
Learn about sqllite, xml files, and php files. Make the flash file call a xml file that talks to a php file that talks to the mysql server.
Otherwise look here: http://active.tutsplus.com/tutorials/actionscript/create-a-flash-login-system-using-php-and-mysql-part-1/
I am working on a project and it needs to accomplish the following:
A user logs into a joomla
Makes a change to some of their profile
This new information updates in the
database
Up to this point joomla will do everything, so the question is how do I take the information from the database and call it into a phonegap app. I am using phonegap and jqtouch for the app, and joomla with jomsocial for the update side.
I cannot have the app open into just a mobile version of the website because apple will reject it from the store. I need this solution to work for people to make updates to their profile, and these updates will automatically post to their app. All users input data on the same site, and share a database. Each profile however will have a different app that is released to the markets, so right now I am focusing on a template framework that can easily be changed to the users portion of the database.
From my understanding the php files stay on the server to process information. The big question is how do i call this information into a phonegap app?
To display XML as HTML you need to parse it through an XSLT stylesheet. This transforms your XML nodes into HTML. Of course, you could just use a PHP XML parser. I think there's one bundled with Joomla, but there are lots out there.
I was going to suggest using a Joomla plugin to push the data over to the Phonegap app. There are lots of events that are fired when an account is created and you could manipulate that.
If the XML is local, Jeepstone is correct. If it is not, how are you going to get it? To do this without running into cross domain issues, I suggest you try out this jQuery plugin on the phonegap side of things ... http://code.google.com/p/jquery-jsonp/ . So to take advantage of that nifty tool, you will adjust the public functions in this script to echo back json_encoded array. With which you can then do as you want on the phonegap side of things.
Ya Apple wants your app to not be useless without internet. But it is straightforward to create your index.html to show the user something. Use the failure and success functions in the jsonp library to show connection problems if necessary.
I am writing a web application (I am a newbie), where the markup is created by XSL and XML transformations and the style is declared by css files and also some use of JavaScript. I need to create a web page that part of its content is the information on files in a specific directory in the file system.
Any ideas?
Are you talking about the client's file system, or the server's?
If the client's, what you are asking is basically impossible for security reasons without some specific browser plugins/extensions (like a java applet with the right access) - you probably don't want to get into that.
If you are talking about the server file system, you will need some sort of server side language to read the file(s) and return them to browser requests. The sort of things that do that are PHP, ASP.NET, Ruby on Rails, etc...also look into Server Side Includes - that may be sufficient for your needs.
Do you mean the client's filesystem or the server's filesystem? If it's the client's, these tools are inadequate (as access to the client's OS is severely restricted for security purposes). I think most people go with a Java applet for stuff like that.