|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
uploading video fileHi,
I was trying to upload a video file onto S3 - it's a .wmv file. What should be the exact String to supply to the setContentType method in the S3Object class? Thanks! |
|
|
Re: uploading video fileI'm not sure what the correct Content-Type is, you will need to search Google for the right mimetype setting for Windows media files. To set the content type, just do:
s3Object.setContentType(mimetypeValue); On Thu, Jul 10, 2008 at 10:34 AM, CodeChica <mxs072100@...> wrote:
|
|
|
Re: uploading video fileJames Murty wrote:
> I'm not sure what the correct Content-Type is, you will need to search > Google for the right mimetype setting for Windows media files. To set > the content type, just do: > > s3Object.setContentType(mimetypeValue); > First hit on Google is a good one: http://support.microsoft.com/kb/288102. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: uploading video fileYes, I checked that website, and tried object.setContentType("video/x-ms-wmv");
for a .wmv file, but it doesn't work - after downloading, and reading from the object through a stream, it doesn't play the video file. I don't know what I am doing wrong.
|
|
|
Re: uploading video fileCodeChica wrote:
> Yes, I checked that website, and tried > object.setContentType("video/x-ms-wmv"); > > for a .wmv file, but it doesn't work - after downloading, and reading from > the object through a stream, it doesn't play the video file. I don't know > what I am doing wrong. > > What is the content (MIME) type of the object as viewed, e.g., by jets3t cockpit? Also, once the object has been downloaded, the MIME type might only be inferred from the document (file) name. Accessing the object from a browser (rather than from a stream) should induce MIME type handling. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: uploading video fileOkay, now I have a sudden new thought as to where the problem might be, but I am not sure how to resolve it:
What I was trying to do originally was, take a video file, split it into parts (of equal size), upload it on S3 as separate objects, and then, download them again and put them together to form a single video file (this is part of an experiment). So, the problem occurs AFTER I download the objects, and put them together - that single video file doesn't play. I tested right after splitting the original file (BEFORE uploading on S3) - I put all the pieces together, and the resulting single file plays properly. Only after the uploading + downloading + putting the resulting pieces together - the single video file doesn't play. I hope that wasn't a very convoluted explanation. So, I attributed this problem to the contentType not being set correctly, however, I just realized that this could be because of some other reason, such as the contentLength not being set correctly or something. I cannot pinpoint the exact problem, or the solution to that problem. Finally, I just want to say that this whole thing works for a text file - just doesn't work for a video file. Please let me know if you know what's going on...
|
|
|
Re: uploading video fileIt sounds like the problem you are seeing is caused by your object reassembly code rather than anything JetS3t is or isn't doing. If you are downloading the raw data and reassembling it yourself, the object's content type metadata will have no effect -- that's only really relevant for browser downloads direct from S3.
I would recommend running your reassembly code, then doing a byte-by-byte comparison of the result file compared to the original. I expect you will find that the files contents are different, and that is why the video won't play. If your code works for a large text file but does not work for the video files, you might need to check that you aren't trying to read the binary video bytes as text characters. Again, a byte-by-byte comparison will be the best way to figure out where the reassembled file is different from the original. James --- http://www.jamesmurty.com On Sat, Jul 12, 2008 at 4:27 AM, CodeChica <mxs072100@...> wrote:
|
| Free embeddable forum powered by Nabble | Forum Help |