ruby - Upload MP3 Files - Invalid byte sequence in UTF-8 -


i'm working rails 5 api (carrierwave), , need put binary data (mp3 files) in postgres database.

first create simple model : rails g scaffold capsule name:string description:string file_upload:binary , : rails db:migrate update database.

after try post "postman application", , using mp3 file "file_upload" row.

but after have bad request saying :

{ "status": 400, "error": "bad request", "exception": "#sequence in utf-8>", ...

i've searched problem able me...

how can fix it? thank much. best regards.

and mp3 not string it's binary file. can either encode uuencode or store bytea.


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -