I'm trying to upload video with Volley using a POST request but i don't know how create the stream of byte of a .mp4 video saved on my Android phone. Can someone help me?
Thank you.
I'm trying to upload video with Volley using a POST request but i don't know how create the stream of byte of a .mp4 video saved on my Android phone. Can someone help me?
Thank you.
Your approach is not the good one, I'd say. It could work but there are much simpler ways: why don't use a File and upload it to your server as a multipart/form request for instance: this answer is really good in this way.
It could be that it's not gonna work with big files and you won't be able to add a progress bar with this option.
I'm a big fan of Volley but it is pretty obvious that it hasn't been design for heavy file transfers and is focused on consuming a simple REST/JSON API. Therefore, I would recommend to switch library to something designed for your needs like this one (Android Async). It is, to me, much better FOR THAT PURPOSE (and if you need a webserver too!)
Hope it helps