Avneet Singh Posted November 15, 2018 Report Share Posted November 15, 2018 Hello everyone, I want to ask Where play media upload files are stored in database and it's stored in which file format. I am trying to send base64 data using POST api - http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/media/{MEDIA_ID}/raw but it is not the right format as in kazoo . Link to comment Share on other sites More sharing options...
2600Hz Employees mc_ Posted November 15, 2018 2600Hz Employees Report Share Posted November 15, 2018 Hi @Avneet Singh The files should exist as attachments on the media doc ({MEDIA_ID}) in the account database. Link to comment Share on other sites More sharing options...
Avneet Singh Posted November 21, 2018 Author Report Share Posted November 21, 2018 Hi @mc_ In which file format audio is saved , is it base64 and path of database in which file is stored Link to comment Share on other sites More sharing options...
2600Hz Employees mc_ Posted November 21, 2018 2600Hz Employees Report Share Posted November 21, 2018 Crossbar will use the 'Content-Type' header you provide when uploading the media binary data. Link to comment Share on other sites More sharing options...
Avneet Singh Posted November 22, 2018 Author Report Share Posted November 22, 2018 Hi @mc_ I am trying to upload audio file using postman POST /v2/accounts/{ACCOUNT_ID}/media/{MEDIA_ID}/raw through node js as middleware server "http://192.168.1.123:8080" is node server address and in response I am receiving data like this - { dataString: { name: '1kHz.mp3', data: <Buffer ff fa 93 cc 26 8b 00 00 12 54 ef 33 35 97 80 02 33 1a ea 37 3b 10 02 64 45 56 6a aa 8b c0 ae 23 2b 0e d7 e8 e5 0f 89 8a 69 c4 f0 09 46 ba 05 0c 1c 1b ... >, encoding: '7bit', truncated: false, mimetype: 'audio/mpeg', md5: [Function: md5], mv: [Function: mv] } } I have to convert the data into encoded form and node supports - ascii base64 binary hex ucs2/ucs-2/utf16le/utf-16le utf8/utf-8 which I have tried . I am trying to get media file from kazoo which I have directly uploaded from monster-ui using request GET /v2/accounts/{ACCOUNT_ID}/media/{MEDIA_ID}/raw and in response I get https://pastebin.com/dzchSF7u . I want to know which file format is this which I have uploaded in pastebin. Link to comment Share on other sites More sharing options...
2600Hz Employees mc_ Posted November 27, 2018 2600Hz Employees Report Share Posted November 27, 2018 Kazoo sets the Content-Type header in the response to the mime type of the binary data. Typically it will be "audio/wav" or "audio/mp3" but will depend on how the audio was uploaded. Link to comment Share on other sites More sharing options...
Recommended Posts