Results 1 to 4 of 4

Thread: How to send a picture file to the database from a mobile app?

  1. #1
    Junior Member
    Join Date
    Feb 2016
    Posts
    13

    How to send a picture file to the database from a mobile app?

    Hi all,

    In the mobile app that I'm building the user should be able to upload pictures (either from the camera or file storage) to be stored in a table similar to how in the Southwind database the Employees have their pictures stored. I think I understand how to get that picture in my mobile app, but once I do how do I go about uploading it to my cloud server? I'm having difficulty finding documentation on the subject.

    Thanks,
    Ryan

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,195
    Blog Entries
    22
    It is data bound. Just touch the picture and you can choose to take a photo or select an existing one. It is uploaded automatically for you and either inserted or updated in the table it is bound too.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Junior Member
    Join Date
    Feb 2016
    Posts
    13
    Oh sorry Barry I don't think I explained what I want to do properly. The user clicks a button and gets the file or camera choice then takes a photo/chooses a file which then gets uploaded to the table on my server. I can do the first part currently using Lianja.getPicture() in my click delegate. I just don't know how to go from there to having the file uploaded and stored in my table. I'm guessing I can do something in the onSuccess callback, just not sure how to do it.

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,195
    Blog Entries
    22
    If you want to do it that way there is more involved as you need to manually upload and call a server side rsp page to handle the decoding of the image and then store it in a table.

    Data binding does that for you. If you have an "upload page" with an image preview above the button would that work for your use case?

    If not the solution is more involved.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us