Accessing and creating text files in s3 from iOS - ios

Does anyone know how to create and access textfiles in a bucket in Amazon S3 from an iphone? I'm trying to take some data I have and store it in a text file in the bucket if said file exists and create a new text file and store the data in this if it does not exist. I'm slightly confused as I understand how to get the object but I don't know how to access it after that.
Thanks!

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?

Accessing metadata of video stored in S3

I have uploaded a video file to S3 using their NodeJS SDK with some metadata. I can see the metadata on the S3 console.
I am recording the timestamp of when in the video a particular event occurs to begin playback from that time when someone renders the video.
This timestamp is what I am storing as part of the metadata in the video file so that I do not need to pass this data to the server through another medium.
I need to use this metadata in my Rails application during render.
When I download the video file, the metadata seems to be lost. I tried using ffprobe to get all meta content but that data visible in S3 is lost.
I read the answer to this question and I seem to be doing the upload right.
Is the metadata I see on the console AWS specific?
How do I access that data through my Rails server?
A "head" operation will allow you to access the metadata without fetching the entire object. Follow this link for more info.
If I were you I would store the metadata in DynamoDB. It is much easier to play with & makes your app more flexible for the future.

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.

Is there a way to save remote urls as they are with CarrierWave?

Is there a way to configure CarrierWave to not download remote images but save the urls as they are?
This is probably a strange question, but there is a case that we do not care the real size of the image if it comes from somewhere outside our website.
Update:
Why not just use a string field to store the url?
Because not all images come from remote urls, some of them are uploaded by users.
I'm just curious if there is a way to configure CarrierWave like that.
Why use carrierwave so? Just use a string field to store the url.

Creating a table entry while using CarrierWaveDirect

Is it possible to use something like CarrierWaveDirect to upload directly to S3 and still be able to gather some data on the files being uploaded?
For instance, is it possible to change the filename, and save the size in a table before/after the upload? I don't need to do any kind of manipulation to the file either (I was reading some documentation regarding the use of Resque).
I realize that this is a very novice question but I couldn't find the answer anywhere.
After a lot of fiddling, I found out that the S3 secure upload form that the hidden field success_action_redirect returns so params on the uploaded file.

Resources