Read More
Read now

Send The Photo (Camera or Media library) to Server by Application (Swift)

Save

Sometimes we need to send the images to a server by taking images from media library or by a camera for this we need to follow some steps.

Here are some steps:

1: Enter the key in info.plist file in a project

a: Media library usage description.

b: photo library usage description.

c: camera usage description.

2: Write this code to access the camera or media library of your phone.

3: Now there are one thing to add in current View controller.

4: There is one delegate method that will receive the image from either camera or media library.

5: Now we need to send the image to server:

 

 

 

 

 

 

 

 

 

 

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


4 comments

  • Viet
    It’s very useful !! Thank you very much!Can you explain more detail about ImageSendUrl and SCREEN_WIDTH ?
    • kunal prasad (Moderator)
      ImageSendUrl : its a server URL where your server will accept the images.
      SCREEN_WIDTH : its your device width.
  • css.php

    Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!

    Deniel Kerr

    Owner and Founder. Opencart

    Talk to Sales
    Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home