Login or Register

RSS IconRecent posts in this topic

avatar
bcolchagoff on May 18. 2007. 1:56 am
ActiveCollab V 0.7.1, PHP5, MySQL 4.1

When I uploaded and revised a word file, a specific version got corrupted. The file name and extension is fine. But word won't open it saying it is invalid format.

This only happend for one of the revisions, the rest are fine.

Interstingly. The byte count is off. The downloaded revision file is smaller than the uploaded file.

HOWEVER, the byte count is EXACTLY the same as the current version!

The current revision (#6) has a byte count of 201,216 bytes
The original file for revision #3 was 214,528 bytes
But, when revision #3 is downloaded, it is corrupt, but has a bytecount of 201,216 bytes.

An inspection of the actual data in the downloaded file showed that is truely was a truncated version of the revision #3 file.

I am using the option of storing files using MySQL.

Would changing to using file system storage potentially solve this?
Is revisioning supported under file system storage?

avatar
bcolchagoff on May 18. 2007. 11:50 am
I tested the same scenario with the same files using file system storage, and got the same results... truncated file.

Any ideas?
avatar Staff
Ilija Studen on Jun 25. 2007. 2:14 pm
A friend sent me instructions how to fix this problem. Try this:

It appears that the download_revision() action is returning the filesize of the current revision of a file no matter what.

The fix is pretty trivial:

Change line 321 in FilesController.class.php from this:

download_contents($revision->getFileContent(), $revision->getTypeString(), $file->getFilename(), $file->getFileSize());

To this:

download_contents($revision->getFileContent(), $revision->getTypeString(), $file->getFilename(), $revision->getFilesize());


Thanks Jake!
activeCollab Team Member
Topic is locked. If you have something important to say about issues discussed on this page please write at hi@a51dev.com.

RSS IconRecent posts in this topic