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?
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
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
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.
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!
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.
Soma
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.