What is the best way to upload image files to web server in java considering IOS9 and swift 2.
Upon searching, I realised that similar question was asked and many different methods are available online to upload images. However I am not sure on what is the best method to follow.
I tried the following approaches and noticed that it takes about a minute to upload an image.
****Approach 1:****
Using NSURLSession and invoking “POST” method of the java servlet Send as JSON as stated in this example
Append image to httpbody itself as stated in this example
****Approach 2:****
Using NSURL and invoking a javascript method as in this example
I also read about AFNetworking 2.0 (ex) and I am not sure if it can bring any performance increase to the uploading process.
Our users might take around 100 of pictures everyday and the images needs to be uploaded to web server for further processing.
Please review and suggest your views. Many thanks.