Want to improve image upload speed from my iphone app to my web server based on window - iphone

I am doing research on speed of photo upload from my iphone application. But I am not able to find out anything over net. I have tried to upload a photo using ASIHttpRequest and also using NSURLConnection.
But I have notice my code takes lots of time to upload a captured photo from camera to my server while facebook does it withing number of seconds about in 20-30 seconds. my code takes about 4 minutes to upload.
I do compress image at client side and then doing upload, but that also take more time then facebook app.
Is there anyone have idea regarding this?

Related

Flutter Menu App that gets pictures from firebase

I have a flutter app that is a menu for a restaurant. Now the problem is that I want to get the pictures from firebase. Currently, if you open the app, the pictures take time to load and you can see that with your eyes, it is a bit annoying and not practical regarding bandwidth data usage.
Is there any chance I can cache the images when I get them from firebase and than appear instantly? I request the links of the images once the page is open using a future and display them with a CachedNetworkImageProvider() with the image URL but that still takes time to load the images. Is there a way to download all the data in the firebase at once when you open the app and not check every time you open the app?
for all apps that require fetching images from a remote location, what i have been doing so far is download the image locally and use the local image instead of the remote one if it exists locally, from my knowledge cachedNetworkImage only caches the image after fetching when the app is currently running and refetches the image when the user restarts the app.
Please if you do find another way to cache images that would be cool and remove a lot of boiler plate code, please do post it, thanks.

What is a good server I can use for uploading / storing videos?

I am making a video sharing app for IOS and eventually will be adding it to the google play store too.
I was previously using firebase for my server to upload videos to, but I ran into some problems and firebase doesn't allow you to upload videos while your app is in the background (at least I couldn't figure it out). So I am switching servers and I would like to get some recommendations from you guys.
Question:
What is a good server / API that I can use to upload and store a lot of videos until they need to be downloaded when a user wants to watch one of them? Videos will be about 10 minutes on average, but they could be as long as 24 hours.

iPhone: Efficiently downloading images from a URL into iPhone App

In my iPhone app , I need to display the images from server.
I need to download it and save it from URLs.
There are roughly 20 images which I need to download.
What could be a way out where in performance doesnt decrease?
I have tried previously using NSData to convert the images into NSData and saving it to my app but it takes lots of time.
What could be a more easier and efficient way out?
I recommend using ASIHTTPRequest to download the images asynchronously, and display them when they're ready. By using the asynchronous interface of that class, your app can be responsive and continue to operate normally while, in the background, you wait for the data to be loaded.
ASIHTTPRequest is open source and free to use: http://allseeing-i.com/ASIHTTPRequest/
The code the Facebook app uses to download and display images has been open-sourced as part of the three20 library.
If you want to write your own networking code ASIHTTPRequest is a very useful library that includes features such as downloading directly to a file and queue management.

iPhone App to generate thumbnail images for the image obtained via camera or photo gallery

My app allows user to obtain picture/image from camera/photo gallery and then the app will upload the images to remote storage. Since the thumbnail images of those images will be used in some scenarios, I need to generate the thumbnail images.
The questions are
should the thumbnail images be generated by the app at the time when the original/raw image is obtained?
is it achievable to upload a raw image and at least 2 of its thumbnail images at the same time from the app to the remote storage - let's say its Amazon S3 or Google App Engine
is there any sample code out there that does the image transformation on iPhone?
I think you should, and put a progress indicator on top to tell your user that "please wait, I'm generating thumbnails".
I don't think at the same time is appropriate for you. Instead, you should try to upload them (2 thumbnails and 1 raw) in a serial manner. That is, "try 1st thumbnail, if succeed, try 2nd thumbnail...",since the internet connection for a mobile device like iPhone could be unstable. Requests-timing-out does happen, therefore it's better to always make sure you have finished the previous request before you start the next one.
I think three20's TTThumbsViewController (or TTPhotoViewController) has done a good job in transforming original photos into square-shaped thumbnails. Maybe you should take a look at their source code.
btw, as for uploading photos to servers, I once used the ASIFormDataRequest to post my photos to a server. It worked pretty well.
Hope it helps. :-)

MPMoviePlayerController on iPhone - Streaming or progressive download?

In my iPhone App I need to show the videos which are in Flash format.
I asked the client to change the videos in iPhone compatible format. They stored the converted the video on a server and I am able to show the video using MPMoviePlayerController.
Now we need to store around 25 videos (Each around 300 MB) and access them via iPhone App using MPMoviePlayerController
I have to help the client figure out how or where to host these files.
So some questions are there
1) What all things need to be taken care on server side for better performance? Is there any document available for this?
2) The video will be streaming or progressive download ? Do we have a choice?
I am sure many people would have done it. So kindly help in this regard.
if video is more then 10 minutes then you have to use streaming not progressive and you have to prepared playlist on server side with .m3u8 format. you just need to pass this url with .m3u8 into the mpmediaplayercontroller and this will take care of every thing from client side.
For server side functionality you can search apple code for streaming video.