I am writing a Java app that uploads image and video files to a server side script. So far I've got the image upload happening using HTTPURLConnection/DataOutputstream and it seems that I might be able re-use a good deal of the code I've written to also upload the video. My question is, where the following snippet declares that the Content-Type is "image/jpeg" for images, what Content-Type should be use used for video files?
output.writeBytes("Content-Disposition: form-data; filename=\"filename\" \r\n*Content-Type: image/jpeg\r\n*Content-Transfer-Encoding: binary\r\n\r\n");
Thanks in advance!