×
Namespaces

Variants
Actions
Revision as of 09:23, 20 September 2012 by hamishwillee (Talk | contribs)

Archived:File upload in Series 40 Web Apps

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

This article is obsolete. Nokia Web Apps 2.0 Beta supports file upload directly in web app context. Please see UpDownExample in samples view.

This article introduces one possible workaround to enable file uploading in Series 40 Web Apps

Article Metadata
Tested with
SDK: Nokia Web Tools 1.5
Devices(s): Nokia X3-02
Compatibility
Device(s): All series 40 devices supporting 1.5 version of Web Apps.
Article
Created: isalento (04 Nov 2011)
Last edited: hamishwillee (20 Sep 2012)

Overview

Nokia Browser 1.5.0.34.11 supports file upload on web pages, but not in a Web App context. If one tries to upload a file from a web app, it fails with “internal server error 500” message. As a workaround a one can set up a web page, which handles uploading, on an external server. In the Web App insert a link to newly created upload page.

Web App:

<div onclick="mwl.loadURL('http://www.yourserverexample.com/up/upload.html');">Upload file</div>

Once user clicks the link, a new browser window is opened. After user is done with uploading she/he can close the window, by clicking the close button [X] in the right lower corner.

Uploader web page:

<!--upload.html -->
<form action="load.php" method="post" enctype="multipart/form-data">
<p>
<label for="file">Select a file:</label>
<input type="file" name="userfile" id="file"/>
<br/>
<input type="submit" value="send"></input>
</p>
</form>


For the server side code that handles actual uploading, please search the web and select one that suits to your use. Tizag.com has good guide on getting started with the PHP implementation.

80 page views in the last 30 days.
×