Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
paradoxic7
Posts: 3
Registered: ‎01-12-2010
My Device: Bold 9000
My Carrier: AT&T

Make mp3 file downloadable to Blackberry

[ Edited ]

Hi,

 

I am trying to figure out how I can link an mp3 file on a web page and have available for a blackberry user to download. If there was a way to make the mp3 play directly from the web page that would work as well. However when I tried using this code:

<object data="myfile.mp3" type="audio/mpeg">Error: format not supported</object>

 

I got the following error: "Requested Entity Too Large"

 

Any help would be greatly appreciated.

Please use plain text.
Developer
Posts: 107
Registered: ‎09-25-2008
My Device: Not Specified

Re: Make mp3 file downloadable to Blackberry

Usually to make a file available for download you have to send it with the HTTP Content-Disposition: attachment header. See http://www.jtricks.com/bits/content_disposition.html for an example.

Please use plain text.
BlackBerry Development Advisor (Retired)
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Make mp3 file downloadable to Blackberry

Greetings,

 

The following knowledge base article will help to explain what this error means:

 

What Is - HTTP 413 Request Entity Too Large

 

The file size limit is has nothing to do with the file type you are accessing, or the browser application, but the intermediate network gateway.  Are you accesseing this web content from your Smartphone through your BlackBerry Enterprise Server (BES), or through the BlackBerry Internet Service (BIS-b). 

 

These network gateways specify a default max file size that can be downloaded through the browser to a BlackBerry Smartphone, and this is likely why you are recieving this message.  What is the size of your MP3 file?

 

Best regards,

Adam

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
New Developer
paradoxic7
Posts: 3
Registered: ‎01-12-2010
My Device: Bold 9000
My Carrier: AT&T

Re: Make mp3 file downloadable to Blackberry

I tried scaling down the mp3 file to a tiny file but I still had the same issue.

 

Is there anything else you can suggest that will allow me to make an mp3 file either playable or downloadable on a Blackberry?

 

Is there perhaps an example site that allows this where I can look at their code to see how they do it...?

Please use plain text.
BlackBerry Development Advisor (Retired)
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Make mp3 file downloadable to Blackberry

Hi paradoxic7,

 

Is RTSP an option for you?  If so I'd recommend streaming your audio files over RTSP instead of progressive HTTP download.  As explained the the above KB article, the error is being caused by a limit set by the network gateway you are using, not because the browser is incapable of displaying the content.

 

About RTSP: Support for media streaming

 

Can you confirm if you are connecting to your web page through a BlackBerry Enterprise Server (BES)?  If so you could contact your network admin to request an increase in this filesize limit?

 

Cheers,

Adam

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
New Developer
paradoxic7
Posts: 3
Registered: ‎01-12-2010
My Device: Bold 9000
My Carrier: AT&T

Re: Make mp3 file downloadable to Blackberry

Thanks for the reply but I'm still having issues. I'm not sure about connecting to the BES but I'd really like this to work for any blackberry user without them having to alter any settings. How exactly do I steam over RTSP and can I do this from the development side?

 

Thanks a lot,

Adrian

Please use plain text.