facebook

File upload to a server

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #348470 Reply

    shahin
    Member

    Is there any example or program as how to upload a file in my Mobione application to my server. I would like to have a webservice written c# which accepts uploaded files from mobione.

    #348506 Reply

    Brandon
    Member

    You can use PhoneGap/Cordova API for file transfers
    http://docs.phonegap.com/en/2.9.0/cordova_file_file.md.html#FileTransfer

    #348548 Reply

    shahin
    Member

    Thank you for your answer. I am reading the example. The other question I have is how can I display a dialog box to search my mobile device for a file. Like File open dialog.
    -Thanks

    #348549 Reply

    shahin
    Member

    Thank you for your answer. I am reading the example. The other question I have is how can I display a dialog box to search my mobile device for a file. Like File open dialog.
    -Thanks

    #348553 Reply

    Brandon
    Member

    It depends on the file, if its a image file from the camera roll you can use this:
    http://docs.phonegap.com/en/2.9.0/cordova_camera_camera.md.html#camera.getPicture

    I dont think most devices support just a file browsing dialog, but not 100 percent sure.

    #348557 Reply

    shahin
    Member

    Thanks Brandon, now I have coded the sample and when I use simulation in the end it comes up with a very unexpected dialog as attached. Any idea what it is?

    Attachments:
    You must be logged in to view attached files.
    #348559 Reply

    Hi shahin,

    That looks like a bug in the simulator, we have seen it in the past when an exception is not handled properly. Please share a small sample project that demonstrate the issue so we can investigate it.

    #348560 Reply

    shahin
    Member

    Here it it…please try the attached demo

    Attachments:
    You must be logged in to view attached files.
    #348562 Reply

    Brandon
    Member

    I was under the impression that the PhoneGap/Cordova File API did to work in the simulator, hence the error.

    #348633 Reply

    shahin
    Member

    Am I doing anything wrong? How can I fix it?

    #348843 Reply

    bremy
    Member

    Hello. I also need to “upload” a text file toward my server and I am having the say guy talking about “chessburger”

    I am pretty sure my server is able to receive a text file send as a stream from a client app. Working like a charm from a C# test client application

    But Impossible from the emulator to have the Cordova “upload” function working

    Any one from you that has success using it or could gives tips to make this working?
    waiting to ear from you

    Many thanks

    #348854 Reply

    support-michael
    Keymaster

    Looks like file xfer API is not implemented. I have opened a bug on the the simulator.

    #348864 Reply

    bremy
    Member

    Thanks a lot Wayne

    I have good news because running a real machine, the upload is working like a charm
    That will be definitely great to have it working in the emulator as well

    take care

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: File upload to a server

You must be logged in to post in the forum log in