Jump to content
KAZOOcon: hackathon signup and details here! ×

Maximum Media Upload Size


AlexKazoo

Recommended Posts

Hi,

I am trying to upload media files bigger than 5Mb in Kazoo 4.3 for music on hold.

I have updated the max_upload_size to 15000000 in the '/system_configs/crossbar'. However, when trying to upload an 7Mb files, I get:

"content_length":{"maximum":{"message":"Value must be at most 5242880","target":5242880,"value":7319180}}

Full log:

Sep 12 10:41:32 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_util:215(<0.12452.151>) application/x-base64 content type when getting req data
Sep 12 10:41:33 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_util:496(<0.12452.151>) received request body payload (size: 8000800 bytes)
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_util:440(<0.12452.151>) request is a base64 file upload of type: audio/mp3
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_util:812(<0.12452.151>) using auth token from header
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|crossbar_bindings:90(<0.12452.151>) folding v2_resource.init
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_resource:94(<0.12452.151>) POST: /v2/accounts/54527481dd235a3611ba3d5e7fb10c39/media/58f1c71edb4e653f03acd45c049340e1/raw? from xx.xx.xx.xx
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_resource:297(<0.12452.151>) run: known_methods
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_resource:309(<0.12452.151>) run: allowed_methods
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|crossbar_bindings:78(<0.12452.151>) pmapping v2_resource.early_authenticate
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|kazoo_bindings:779(<0.12452.151>) matched [<<"early_authenticate">>,<<"*">>] to [<<"early_authenticate">>,<<"v2_resource">>]
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_token_auth:179(<0.12460.151>) checking auth token
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|kz_auth_keys:152(<0.12460.151>) public key '6823a167d6a1c0504b0dcafdca330488' fetched from cache
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|kz_auth_jwt:132(<0.12460.151>) verifying claimed identity
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|kz_auth_identity:302(<0.12460.151>) verifying key for identity '54527481dd235a3611ba3d5e7fb10c39'
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_util:720(<0.12452.151>) one true context: []
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_resource:322(<0.12452.151>) run: authed_allowed_methods
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|crossbar_bindings:73(<0.12452.151>) mapping v2_resource.allowed_methods.media
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|kazoo_bindings:751(<0.12452.151>) matched [<<"media">>,<<"allowed_methods">>,<<"*">>] to [<<"media">>,<<"allowed_methods">>,<<"v2_resource">>]
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_accounts:1248(<0.12452.151>) account 54527481dd235a3611ba3d5e7fb10c39 db exists, setting operating database as account%2F54%2F52%2F7481dd235a3611ba3d5e7fb10c39
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|crossbar_bindings:78(<0.12452.151>) pmapping v2_resource.authenticate
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|kazoo_bindings:779(<0.12452.151>) matched [<<"authenticate">>,<<"*">>] to [<<"authenticate">>,<<"v2_resource">>]
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|kazoo_bindings:765(<0.12452.151>) exact match for v2_resource.authenticate
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|crossbar_bindings:78(<0.12452.151>) pmapping v2_resource.authorize
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|kazoo_bindings:779(<0.12452.151>) matched [<<"authorize">>,<<"*">>] to [<<"authorize">>,<<"v2_resource">>]
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_context:237(<0.12478.151>) checking for superduper admin: 54527481dd235a3611ba3d5e7fb10c39
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_context:240(<0.12478.151>) the requestor is a superduper admin
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_simple_authz:146(<0.12478.151>) authorizing, the request does not contain any system administration modules
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_simple_authz:69(<0.12478.151>) authorizing the request
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_context:237(<0.12492.151>) checking for superduper admin: 54527481dd235a3611ba3d5e7fb10c39
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_context:240(<0.12492.151>) the requestor is a superduper admin
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_simple_authz:146(<0.12492.151>) authorizing, the request does not contain any system administration modules
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_simple_authz:69(<0.12492.151>) authorizing the request
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|kazoo_bindings:765(<0.12452.151>) exact match for v2_resource.authorize
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|crossbar_bindings:78(<0.12452.151>) pmapping v2_resource.authorize.media
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_resource:504(<0.12452.151>) run: content_types_provided
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|crossbar_bindings:90(<0.12452.151>) folding v2_resource.content_types_provided.media
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_resource:531(<0.12452.151>) ctp: [{{<<"application">>,<<"json">>,[]},to_json},{{<<"application">>,<<"x-json">>,[]},to_json},{{<<"application">>,<<"octet-stream">>,[]},to_csv},{{<<"text">>,<<"csv">>,[]},to_csv},{{<<"text">>,<<"comma-separated-values">>,[]},to_csv}]
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_resource:634(<0.12452.151>) run: languages_provided
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|crossbar_bindings:90(<0.12452.151>) folding v2_resource.languages_provided.media
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_resource:662(<0.12452.151>) run: resource_exists
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|crossbar_bindings:73(<0.12452.151>) mapping v2_resource.resource_exists.media
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|kazoo_bindings:751(<0.12452.151>) matched [<<"media">>,<<"resource_exists">>,<<"*">>] to [<<"media">>,<<"resource_exists">>,<<"v2_resource">>]
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_resource:674(<0.12452.151>) requested resource exists, validating it
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|crossbar_bindings:90(<0.12452.151>) folding v2_resource.validate_resource.accounts
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_accounts:1248(<0.12452.151>) account 54527481dd235a3611ba3d5e7fb10c39 db exists, setting operating database as account%2F54%2F52%2F7481dd235a3611ba3d5e7fb10c39
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|crossbar_bindings:90(<0.12452.151>) folding v2_resource.validate_resource.media
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|crossbar_bindings:90(<0.12452.151>) folding v2_resource.validate.media
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_media:252(<0.12452.151>) uploading binary data to '58f1c71edb4e653f03acd45c049340e1'
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|crossbar_doc:237(<0.12452.151>) loaded doc 58f1c71edb4e653f03acd45c049340e1(2-08071b75e3421e204b8138728706bc15) from account%2F54%2F52%2F7481dd235a3611ba3d5e7fb10c39
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_media:277(<0.12452.151>) loaded media meta for '58f1c71edb4e653f03acd45c049340e1'
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_media:305(<0.12452.151>) normalization not enabled, leaving upload as-is
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_context:868(<0.12452.151>) validation errors but not strictly validating, trying to fix request
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|cb_context:884(<0.12452.151>) validation failed media: [{data_invalid,{[{<<"description">>,<<"Length, in bytes, of the file">>},{<<"maximum">>,5242880},{<<"minimum">>,1},{<<"support_level">>,<<"supported">>},{<<"type">>,<<"integer">>}]},not_in_range,7319180,[<<"content_length">>]}]
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_util:1051(<0.12452.151>) validating data failed
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_resource:686(<0.12452.151>) failed to validate resource
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_util:1687(<0.12452.151>) stopping execution here with status code 400
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_util:1590(<0.12452.151>) generating error 400 validation error response
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_util:1690(<0.12452.151>) setting resp body: {"data":{"content_length":{"maximum":{"message":"Value must be at most 5242880","target":5242880,"value":7319180}}},"error":"400","message":"validation error","status":"error","timestamp":"2019-09-12T09:41:34Z","version":"4.3.32","node":"XQIuNMsKxxqsgjHG17Zezw","request_id":"e0fb62358b9a255e05da2c19e121d434","auth_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjY4MjNhMTY3ZDZhMWMwNTA0YjBkY2FmZGNhMzMwNDg4In0.eyJpc3MiOiJrYXpvbyIsImlkZW50aXR5X3NpZyI6IkN4QmRpOWlaekhxeXpaaFhOYTNiTGI0ZnN0UUo1UzRSYlpqZUJ6YUZDVDgiLCJhY2NvdW50X2lkIjoiNTQ1Mjc0ODFkZDIzNWEzNjExYmEzZDVlN2ZiMTBjMzkiLCJtZXRob2QiOiJjYl9hcGlfYXV0aCIsImV4cCI6MTU2ODI4NDg4OH0.e6_b71aDQv0UBwYvZgG_LsYiL2NP6o4-PjSAPmcGBSZtgsPkBWH_v9JtLwdJ3ZvnxkowkAEqKLwEGhW4gTWEUY9tjpC9EiqSFHyW-xFqTxEltiNgFUWRhqq02dp4wl7qwNJyuHKftUx8LJ_Sn8u98vJ8K4dLdUsFRT-5whdbcbN058P-SJYg-Ov58u7X-Q53R7ESIiAkljF2rTbnrKeiLpZBawM3LkEARy_mW1I2jW0iLbHn-czFpQYnAvea5l1owcmvL_1qHwl3ohdJcMYbsZ4wJe40UW5GGpPUXs_PYfxdIIZkYG0uWcWWcM-guFmj6tToNbZx7Hz3jbucRSu_9g"}
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_util:1694(<0.12452.151>) ensured CORS headers are on the response
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_util:1698(<0.12452.151>) replying with 400
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_resource:246(<0.12452.151>) session finished: normal
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|api_resource:259(<0.12452.151>) POST request fulfilled in 2094 ms 236K656B mem 6M1006K907B bin
Sep 12 10:41:34 kazoo-test 2600hz[427]: |e0fb62358b9a255e05da2c19e121d434|crossbar_bindings:78(<0.12500.151>) pmapping v2_resource.finish_request.POST.media

Uploading files smaller than 5Mb works fine. Is there anything am I missing?

 

Link to comment
Share on other sites

If you wanna use wav file format then you can convert the audio to 8000hz as if you are using PCMU then the audio will again get converted to 8000hz, this will decrease the size of your file significantly or if you are open to the option of using mp3, that will also work, both of these reduce the size of your music on hold file. You can audacity to do both.

Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...