aspose file tools*
The moose likes Servlets and the fly likes Problem of downloading and displaying a MOV file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem of downloading and displaying a MOV file" Watch "Problem of downloading and displaying a MOV file" New topic
Author

Problem of downloading and displaying a MOV file

david zhang
Greenhorn

Joined: Oct 12, 2003
Posts: 27
Hello, I did a small web app that can upload and download/display movie files. The web app runs on my notebook (64-bit Windows 7 Professional).

On my notebook, I installed QuickTime and I am able to view MOV movies. I can also view mpeg movies via Windows Media Player. When I upload a MOV file, I am able to go to the web app and to find the uploaded MOVE file and play it with QuickTime without any problem. The same goes for mpeg files. Here is the problem. The web app has an interface for downloading the uploaded movie files. On this interface, there is no problem of downloading mpeg files or opening it via Windows Media Player. However for MOV files, download always produces smaller files and viewing always fails.

This web app has no problem of uploading/downing Word or PDF files. For downloading MOV files, I verified many times to ensure the web app sends correct HTTP headers to a browser, including content type. I also noticed that for downloading MOV files, the web app is able to read full files. But why the download produces smaller files?

What could be the problem? Do I have to install extra software?

This is a big puzzle to me and did not find anything from Google.

Thanks very much for any help.

All the best.



Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
So the uploaded file is byte for byte identical to the original file, but the downloaded file is not identical to the uploaded file? What code handles the download?
david zhang
Greenhorn

Joined: Oct 12, 2003
Posts: 27
Lester, thanks so much for chiming in.

The download code is written in java and it is the part of the web app. It is the same code for downloading mpeg, MS Word, and PDF.

I repeatedly verified that when downloading via the web interface, the web app does read the entire file to send to a browser and the content type is right too for MOV file (video/quicktime)

Regards.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
I'm confused - earlier you said the downloaded file was smaller than the original, but now you've made sure that the web app sends the complete file? How did you do make sure of that?
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 577

Hi David,
I was replying to this post and yours sounded relevant.

Are you able to post your java code to download? I'm sure you considered the other option I provided in the above link.


Cheers,
Naren
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem of downloading and displaying a MOV file