Does AWS S3 cache mp3 files to local? - amazon-s3

When I click the mp3 file's AWS S3 path, it plays in my browser, see screenshot below:
Is the mp3 downloaded/cached to my local machine? If so where is it? I tried to search for it in Chrome cache folder but did not find anything. Very curious how this works exactly.

No, S3 doesn't cache any files locally. If a file were cached it's determined by your browser, who makes the decision based on a number of factors (such as HTTP headers, see [1]).
The reason the MP3 file plays in your browser is because your browser knows it can play the MP3 file and not just download it.
[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

Related

Play audio file from S3

From my flow I can't play audio files stored in S3.
The playback function from a text file is working correctly.
The ability to play an audio file from the standard library is also broken.
but i want to play my custom WAV files stored in S3.
and it doesn't work or I don't know how to do it !!!!
Amazon Connect has updated contact flows to now allow playing a prompt from S3, https://docs.aws.amazon.com/connect/latest/adminguide/play.html
You can't reference files stored in S3 directly from Connect. You have to upload the wav file into Connect via the UI in the Routing/Prompts section.

make it impossible to download the audio files

So guys, how do I prevent users from downloading audio files on my web app (running springboot in backend) by accessing the s3 url !
I want to make it impossible to download the audio files in my website ! Any suggestions pls ?
I assume you mean that you want to make it impossible to download the audio files, but still allow streaming them for playback.
You can't.
If it can be played, it can be downloaded. Simple as that.
At best, you can sign your S3 URLs so that they expire after a short period of time. This gives you control over who accesses your audio files, and prevents them from showing up in searches, or linked to from other sites. You can also look into Encrypted Media Extensions, but it's not all that useful for audio since audio is trivially digitally captured on the output.

Programmatically add meta data for MP4

I have a server from where a single consumer me download MP4 files. I would like to add the username to the meta-data of the file at the time the user clicks "download". Amazon does something like this for the MP3 files.
Now, a slight variation to this is how would I do the same thing if the files are on Amazon Cloudfront.
Thanks!
You would have to route your request through your web server.
Logged-in user clicks
Web server downloads the MP4 file from S3 to its file system.
Web server uses an MP4 editor to add the correct MP4 metadata to the file.
Web server serves the MP4 file back to the customer as a download.
S3 is dumb file storage, so you can't do any on-the-fly editing or processing. Any such work must occur on a machine with a CPU.
As such, the question you posed could not be accomplished in any meaningful way using CloudFront, since the traffic needs to route back through your server for post-processing anyway.

Cloudfront - Stream not Found

I'm kind of new to cloudfront but have managed to get JWPlayer working rtmp for a .mov I put in a bucket connected to a streaming distribution. What I'm not sure about is that I've added 2 other .mov files to the same bucket and made them public both with the same permissions (Everyone: Open/View) however the player reports stream not found. Does it take a certain amount of time for the videos uploaded to become accessible via RTMP?
thanks
Using .mp4 (h.264) files fixed this issue for me.

AWS s3 file downloads are not working in Chrome (Works fine with IE, Mozilla, Safari)

I am using s3 to store my pdf files. But when i tries to download the files from s3 using chrome browser it doesn't do anything. It just refresh the page, no error, nothing ...
But from other browsers i can download that file.
When i checked in the console it gives 'Resource interpreted as Other but transferred with MIME type undefined.'
I got one thread from AWS https://forums.aws.amazon.com/thread.jspa?threadID=79493
But we can not tell user that go & disable this plugin & then download.
Is it a problem from AWS end?
I searched a lot but didn't get any solution.
Please help me to resolve this issue.
Thanks,
Vijay
I had this problem too. The solution it to force Chrome to download the PDF file instead of trying to open it in its reader.
In your GET request, append response-content-disposition=attachment. Refer to the S3 documentation on how to do this.
More details available here.