Issue with URL of images - amazon-s3

I am doing an integration with Smartsheet and I have an issue with the presigned URLs for the images(attachments), all of them are expired, 4 weeks ago I did not have this issue, I was able to get the images from the presigned URL of AWS S3.
I am trying to pull presigned URLs for the images(attachments) that a smartsheet captures son I can transmit them to my client onboarding system.

Related

What's the image upload flow for websites with CDN

I'm preparing for system design interviews and can't seem to find an answer to the question below -
What happens when a user uploads an image to Facebook (or any other platform that uses CDN, such as Twitter, WhatsApp, or other social media platforms)?
Let's assume
Facebook's origin server is in California, US
user_a is in India.
This user must be connected to a CDN network edge server, which is providing all serving requests to this user on behalf of Facebook's origin server.
What occurs when user a uploads an image? -
Will the upload request be sent to the core server, where it will be propagated to the CDN network, and the CDN URL will be returned to user_a to be cached in the user_a's browser?
Upload will take place at the CDN edge server, and the user will be given the cdn url (which user_a's browser can cache), and CDN can submit this image to FB's core server.

How to download images/files by AWS S3 secured URLs on mobile app OR WEB?

Right Now,
The S3 URLs are private.(To avoid direct access from any un-authorised user)So we are not able to access S3 urls directly. To overcome this issue we are sending base64 string of attachment in API response.On web there is no such difficulties for me to handle this scene. But for mobile APP i am facing issue. So following are the some questions related to it.
1.Is it good idea to use base64 string on mobile APP? (Because payload will go in MB`s)
2. I also come to know about pre-signed urls. Are they safe? Because here we are providing a temporary url(Last for some time).
For react native mobile apps to download files we need http/https file url. Is there any other way to handle this issue?
Is there any other way to tackle this situation.

S3 Bucket non-encrypted HLS works, but CloudFront of it doesn’t

As the title says. S3 Bucket non-encrypted HLS works, but CloudFront of it doesn’t. I have been trying to get it to work for hours without any success. I followed all the docs closely. I set up header whitelist on CloudFront as well. Please help? When playing the video I get Network error message. It plays without any problem with the S3 Bucket URL. I tried various HLS streaming test websites.
HLS encryption does not work with Sign URL. With HLS encryption we break the video in multiple files (.ts) so if we want our playlist file (.m3u8) can able to access all those .ts files then we need to access those .ts files through signed cookie only.

Migrate videos from Vimeo to S3

I have a large quantity of videos on my Vimeo account that I would like to migrate to my AWS S3 account.
Rather than go through the time consuming process of downloading from Vimeo to my local machine then uploading from my local machine to S3, is there a way where I can do a direct transfer from Vimeo to S3?
If possible, I would want to create a script to iterate through each video via Vimeo API and set up the path to where it would go into S3 then initiate a direct transfer. Any ideas or suggestions would be much appreciated!
If you have a PRO account or higher, you can use the API to get download links for videos on your account, including download links for the original source file. Those download file links should be able to be used for importing into S3. Note that the links provided via the Vimeo API are expiring HTTP 302 redirects to the video file resource, so make sure you take note of the expiration time also provided in the response.
Download links are returned with the rest of a video's metadata, so I suggest using the fields parameter to only return the metadata needed.
http://developer.vimeo.com/api/common-formats#json-filter
https://developer.vimeo.com/api/reference/videos#GET/users/{user_id}/videos

Rails Paperclip Phonegap Heroku S3- How to return image files from an Ajax request through the controller?

I am creating a mobile app through Phonegap as the client and using Rails as the back-end. I am deploying my app to Heroku and am planning to use S3 to store the image files, because that is what is recommended from my various readings online.
I was wondering how could the Rails controller be used to send images back from Ajax requests from Phonegap.
I am not sure how to write the back-end API code to send images to requests.
I also read that using the send_file method without x-send_file enabled will slow down the server because sending the image would block other request until it is done.
Please let me know if you have any insights.
You could use redirects to the S3 assets here, then your browser is just getting the image directly, and not holding up one of your server processes while the browser slowly downloads the images.
If you need to keep your images private you can use the signed URL feature of S3 to only give signed and time limited URL's to the appropriate users. (See my commit to Paperclip: https://github.com/thoughtbot/paperclip/pull/292)