Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2009

    Using iframe for photo upload

    I'm developing a widget which should do photo uploads. After a successful upload the widget should display the newly uploaded photo.

    Photos are uploaded using HTTP POST to a REST API. The API will (only) return a XML file containing an atom feed of the uploaded photos. I'd like to read the XML file, parse the URL of the uploaded photo and display it to the user.

    I'm currently using an iframe to upload the photo. This way I can keep the user on the upload page until the upload is ready. I'm using jQuery to listen when the iframe has finished loading the XML:
    $('#fileUploadFrame').load(function() { ... });
    The trouble is, I can't get the contents of that XML. I've tried for example:

    var xml = document.getElementById('fileUploadFrame').contentWindow.document;
    Is there a way to read the iframe's content? Or is there some better way to handle file uploads with or without iframes?

    Thank you for your answers.
    Last edited by oiva; 2009-03-02 at 09:37.

  2. #2
    Registered User
    Join Date
    Dec 2009

    Re: Using iframe for photo upload

    but work only in 5 edtion.

  3. #3
    Nokia Developer Champion
    Join Date
    Nov 2007
    Rome, Italy

    Re: Using iframe for photo upload

    Just a guess: this could be someway related to the same-domain security policy. As a more tested and cross-compatible approach for file uploads, you may want to try out API Bridge:



Similar Threads

  1. HTTP POST - Upload multiple files
    By bgenady in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2009-01-21, 01:49
  2. Replies: 3
    Last Post: 2006-05-02, 20:12
  3. Where can I upload an Appication?
    By Borriez in forum General Development Questions
    Replies: 0
    Last Post: 2005-09-20, 15:36
  4. upload J2ME app onto Java phones
    By mzichao in forum Mobile Java General
    Replies: 1
    Last Post: 2005-01-11, 07:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts