Namespaces
Variants
Actions

Archived:File upload in Series 40 Web Apps

Jump to: navigation, search
Archived.png
Archived: 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 Nokia Asha 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 (09 May 2013)

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.

This page was last modified on 9 May 2013, at 13:30.
272 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved