How to upload an image to node/mongodb backend from ios swift - ios

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

Related

Get an image from URL and upload it to Firebase Storage

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?

Base 64 or Image file to upload for mobile apps IOS using swift

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.

AWS S3 Metadata iOS

I am developing photo sharing application in iOS using Amazon as backend.
I have uploaded photo to S3 but my problem is how to get metadata of uploaded photo, actually i want lat and lang of that photo. I am using latest sdk version 2.0.2 of aws.
Can you help me? Can you guid me which function I have to use to get meta data information?
The location data, if available, is embedded inside the image file itself and is not part of the file's S3 object metadata. You can define your own custom metadata when the image is uploaded and set the image's coordinates there.
It may be better though to store the coordinates in a DynamoDB table along with the image's S3 object key to provide better lookup and querying.

Uploading Multiple Images with Phonegap

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?

Rails + Paperclip + Amazon S3: SAving images to Amazon but need to process them before and after

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

Resources