22
Views
6
Comments
Upload Audio Files to AWS S3 (Not as a binary file)

I am currently attempting to upload audio files to an S3 bucket from my mobile app; however, the resulting uploaded file appears to be in binary format (I'm using upload widget with binary type variable). My intention is to upload the audio files in their original file format without any alterations or conversions. Any suggestions?

2021-03-05 13-56-11
Ricardo Pereira
 
MVP

Hi Soma,

Can you give us some prints of the code under analysis or share your OML? It's easier to understand if we can see what the code is doing.


Thanks!


Best regards,

Ricardo

2019-09-24 18-41-25
Jorge Martins
 
MVP

Hi Soma,


Binary format is the right format, it's storing the audio file as is  (all files can be represented in their binary - zeros and ones - form, without any change to their content).

What do you need to do with the audio files afterwards?

Note: Edited to remove mention of databases, as it is not relevant here

2023-06-12 07-31-34
Soma

I would like to upload an audio file to an Amazon S3 bucket and subsequently store the corresponding URL in a database. This approach will allow me to conveniently retrieve and play the audio file as needed.

2019-09-24 18-41-25
Jorge Martins
 
MVP

Updated my answer above, as Binary Data is not specific to database storage.

The uploaded file needs to be stored in a variable of type Binary Data, as you currently seem to have.

You will then need to use the Amazon Simple Storage Service (S3) connector to upload it to S3 and obtain its URL. You can find here a useful explanation on how to do use it.

Hope this helps!

2023-06-12 07-31-34
Soma

Hello Jorge,

I have successfully uploaded the audio file in binary format to S3. Now, I would like to play the audio in my mobile app by using its URL.

Best regards,

Soma

2019-09-24 18-41-25
Jorge Martins
 
MVP

You can search these forums and the forge for several possible approaches. HTML has a “audio” tag to help you with that, it is also possible to do it from JavaScript…

That being said, if you do need to ask questions about playing audio in applications, I strongly suggest you create a new topic, as this question was about uploading a file to S3, and you’ve successfully solved that.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.