开发者

how to upload images on the serve from the SQLite when network available

开发者 https://www.devze.com 2023-04-05 14:01 出处:网络
I am working on an app. witch functionalityis user ta开发者_开发知识库ke photo from camera and saved on the server.if network is available otherwise it saved in locally in iPhone(via sqlite). but when

I am working on an app. witch functionality is user ta开发者_开发知识库ke photo from camera and saved on the server.if network is available otherwise it saved in locally in iPhone(via sqlite). but when network is available it take all local images from database and saved on the server. after that it delete from the server.

my problem is how to save images on the serve(when network available) when application is running on the background.

plese suggest me.


there are three questions:

1: how to upload and store a image on a webserver
2: how to send an image to the webserver
3: how to trigger uploading an image with respect to network-reachablity

1: Restful-Service or normal web-form-file-upload

2: depends on the method you choose in 1. if restful-service: binary-data in HTTP-Body; if web-form-file-upload via multipart then take a look at this so-thread

3: either just try sending: you will get an error if the iphone is not able to send data and thn try a few minutes later. Or use the Reachability-Example from Apple which is able to notify you about internet-reachability.

0

精彩评论

暂无评论...
验证码 换一张
取 消