Contents |
File uploads allow users to upload files from their devices to a remote server, directly from a mobile application.
The simplest scenario is the upload of a single file. The user is typically required to select a file, by browsing files available on his device, and then confirm the upload by pressing a button or softkey. Sometimes, the user is allowed to compile some other meta-data fields, with data that will be sent to the remote server together with the uploaded file.
An example of single file upload is visible in the Flikun client, a photo uploader for Flickr:
A more complex approach to file uploads is represented by the upload of more files. The user is requested to choose one or more files from his device, and then starts the upload. Typically, multiple files upload is supported by detailed progress information about the upload of each file.
An example of multiple file uploads is visible in the Shozu mobile client:
Both in single and multiple file uploads, it is good practice to give to the user a clear indication of the upload progress status.
This can be done in different ways, depending on the available information about the upload status:
For multiple file uploads, a dedicated view is typically used to give detailed information about the status of each upload. This view should give to the user clear information about which files have already been uploaded, which are currently uploading, and which are waiting to be uploaded.
Detailed explanation of progress and wait indicators is available on this Forum Nokia Wiki article: Mobile Design Pattern: Progress and Wait Indicator
File uploads are useful in all those situations where a file must be transferred to a remote server. Sample scenarios include:
File uploads can be differently handled and implemented depending on the technology used in a mobile application. Since file uploads require the capability for the users to choose one or more files from their devices, the used technology must provide some sort of access to the underlying file system.
An usual approach to implement file uploads is represented by HTTP MultiPart POST requests, the same method used by website forms to upload files. Other possible approaches include FTP transfers, or direct Socket connections.
Java ME applications can allow users to upload files by:
An example of file uploads in Java ME that uses the HttpConnection object is available in this Forum Nokia Wiki article: HTTP Post multipart file upload with J2ME
Flash Lite does not natively support functionalities that allow file uploads. But this is possible, on specific subsets of devices, through third-party plugins.
An example is represented by KuneriLite, that allows file uploads by using the following plugins:
An example of file upload implemented with Flash Lite and the KuneriLite plugins is the Flikun client.
A detailed example showing how to upload files in Symbian C++, by using the multipart approach, is available here: Symbian C++ : Multipart/form-data
The following articles show how to browse files on device's file system, and how to upload them to a remote server in Python:
The following article explains how to upload files from a Web Runtime widget: How to upload files from a Web Runtime widget
No related wiki articles found