Jump to content

Recommended Posts

Posted

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 .

 

Posted

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.

Screenshot from 2018-11-22 11-21-46.png

  • Administrators
Posted

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.

×
×
  • Create New...