commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morten Andersen <mort...@mip.sdu.dk>
Subject commons.net FTP upload corrupts video-files
Date Tue, 15 Jun 2004 14:19:50 GMT
I am trying to make an automatic upload from a web-server to a 
media-streaming server of streaming videos. This fails. The files seems to 
get corrupted. I don't know why:
Here is some of the code:
--------------------------------------------------

  InputStream input = new FileInputStream(file);
  ftp.setFileTransferMode(FTPClient.BINARY_FILE_TYPE);
  ftp.storeFile("TEST-FILE.wmv", input);

---------------------------------------------------
ftp is a FTPClient and the file I'm uploading is a "wmv" file.

The file gets uploaded but as I try to download it and play it Windows 
media player argues that the file is corrupted.

The uploaded file is 800 bytes bigger then the original.

Please advice...


Morten Andersen
Master of applied mathematics and computer science
Amanuensis
Interest areas:
   -e-learning
   -software engineering
   -applied math

The Maersk Institute of Production technology at Southern Danish University 
www.mip.sdu.dk
Campusvej 55
DK-5230 Odense M
Denmark
+45 65 50 36 54
+45 61 71 11 03
Jabber id: hat@jabber.dk


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message