I'm looking for some advice on the best practice for uploading multiple images to a server via Phonegap. Currently I have an app that will open the camera, take a picture, and then upload that as base64 data along with other form data via POST. I would like to allow uploading of 3 images with the form data. Any suggestions?
Related
Is it possible to write a function to get an image from a url such as https://website.com/images/myImage.jpg and then automatically upload it to a Firebase Storage bucket?
I am trying to do it with multiple images in one go but am struggling to get one to work at the moment. My best attempt so far has seen me having to download the images, save them in the Media Library and then send them all up to Firebase, which surely cannot be the most efficient way?
In a nutshell, I have 10 images with URL's like the above and, when the function is fired I need them all to upload to my storage bucket, without the need to save them to the users device library.
Does anyone have any ideas on the most efficient way to do this please?
What is the latest sayings and professionals recommendations to use images for mobile apps. I'm very confused. Being a newbie in IOS development... there are always many directions before decision. Can somebody please recommend what kind of files type should I Use. Base64 encoding to directly store into DB or Images and upload them onto the server. if base64? what datatype do you guys recommend? i'm using BLOB is that fine?
This link says we should use base64
But many says. file size is very heigh in base64 than images (JPG or PNG)s.
It depends on the server, many of them have a "file" option with a callback containing the URL, then you just store the file and consume the URL. I really think that base64 is too much unnecessary processing.
The easiest one is Firebase Storage, where you can just put the file as image/jpeg and receive an URL to that image. Another option is Cloudinary, there are many options.
Most apps just download images from URL's and show them as demanded. You can store images anywhere you want, and in your DB you store URLs from them.
I am trying to upload an image from the iphone gallery onto a backend that is constructed using node and mongodb as the db. I am essentially very new to app development and have had 0 luck in finding any useful information. Any help would be much appreciated.
Here you can find some information about storing images with node.js in a mongodb.
Uploading and storing images
And uploading an image with swift:
Uploading file with parameters using Alamofire
I have an app and Im saving the users uploaded images to Amazon S3. However, often users images' are not consistent. And for me to be able to use them in my app they need to be a certain width and height.
Id like to store a basic image in the storage but when using the image within the web app, in different views I need different sizes.
How should I tackle this problem? The challenge is that saving the image and retrieving the image goes directly from app to Amazon S3 without the app being involved.
Any suggestions?
Thanks
Paperclip allows you to define styles to resize your images after uploading. Refer https://github.com/thoughtbot/paperclip/wiki/Thumbnail-Generation
I have a web app in which users can upload an avatar under 700kb. That's the only part of the application dealing with uploading images (so I won't be dealing with an exceptionally heavy load). I was wondering what the best way is to go about this. Currently I'm using Paperclip and I wan't to store all of the images on Amazon's S3.
Option 1: User uploads the image to my web server. The image is processed asynchronously using delayed job and is then uploaded to s3. The image is then deleted off of my web server.
Option 2: User uploads the image directly to s3. A background process on my web server downloads the image, processes it, and uploads the newly created thumbnails to s3.
Option 1 seems to use less bandwidth overall. Option 2 seems to save my application the resources of having the image uploaded directly to it.
Am I correct in these assumptions? Which option is the fastest and most resource-friendly? Or is there another way to go about this?
Also, I was wondering if sites like Twitter, FB, and Posterous asynchronously process images. Whenever I upload a profile pic on Twitter, or images on FB and Posterous, they seem to be processed instantly.
Thanks!
Tim
Your best bet is to have the user upload directly to S3. The d2s3 plugin works well for this.
In your d2s3 callback, create a delayed_job event to download the full size images and save thumbnails them to S3 with Reduced Redundancy Storage. If you wire everything up correctly, you can automatically generate thumbnails when and if they're ever lost from S3.
If by "processing image", you mean creating thumbnails or other image conversion options, you can do that using paperclip. If processing is a huge task that can't be achieved using paperclip alone, then I would go with option 1, cheaper as you don't access S3 multiple times. Just make sure you have enough hard disk space for all images during processing.
If you end up going the route of uploading directly to S3 which offloads the work from your Rails server, please check out my sample projects:
Sample project using Rails 3, Flash and MooTools-based FancyUploader to upload directly to S3: https://github.com/iwasrobbed/Rails3-S3-Uploader-FancyUploader
Sample project using Rails 3, Flash/Silverlight/GoogleGears/BrowserPlus and jQuery-based Plupload to upload directly to S3: https://github.com/iwasrobbed/Rails3-S3-Uploader-Plupload
By the way, you can do post-processing with Paperclip using something like this blog post describes:
http://www.railstoolkit.com/posts/fancyupload-amazon-s3-uploader-with-paperclip