Reputation: 5935
I want to upload a mp3 file via Websocket in Android Application.
I was using the external library http://autobahn.ws/android/
But the problem is that through this library,I cannot upload a big file.say 5 Mb. I tried researching on similar types of libraries.But could not found a suitable one. Has anyone tried to upload file on WebSocket in Android Application.
Thanks
Upvotes: 0
Views: 810
Reputation: 15336
As per the mentioned error you are receiving "WebSocketException: frame payload too large"
, if you go to the source code of the library you are using and search for error you will find out the limitation imposed by the library itself.
// immediately bail out on frame too large
if (payload_len > mOptions.getMaxFramePayloadSize()) { throw new WebSocketException("frame payload too large"); }
You'll find the this limitation in WebSocketOptions.java
mMaxFramePayloadSize = 128 * 1024;
Upvotes: 1