Community Support for OpenDocMan (Deprecated)

Full Version: Documents uploading as 0KB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Installed the software, it all looks great, it all appears to work well, but when uploading MS Word docs, they show as X in the document size column, and upon download, as blank files. There are no error messages during upload or at any other time.

If I then check out the document and check back in, by uploading the original document, it appears just fine and shows as the correct size.

escol2006
That sounds familiar to other problems posted here...

The usual issues with uploading documents have to do with file sizes, and you have to check your PHP, Apache, and ODM settings. The next thing is mimetypes, and you may need to check the system's mimetype file or ODM settings.

Check your web logs for more information.

It might help to know what operating systems and versions you're using.

- Jon
Apache/2.0.54 (Fedora)
Linux
Latest version of OpenDocMan 1.2.5

I've checked the mime types and they appear to be fine, the max file size is also not an issue.

The puzzling thing is, these files upload just fine if I check them out, then check them back in, so something is going wrong somewhere along the line

escol2006
Have you checked your data directory to see if the file exists after the initial upload?

Any "strange characters" in the filenames?

Does it effect all files... or only certain types (or sizes?)

-Jon
Looking at the source code in add.php and check-in.php, there is a slight difference in how the uploaded file is handled.

add.php: move_uploaded_file ( string $filename , string $destination )
check-in.php: copy ( string $source , string $dest [, resource $context ] )

You could change add.php tp use copy() instead. I'm not sure I fully understand the differences, except what the PHP docs say.

-Jon
Thanks for the input. I tracked it down to the lack of a trailing slash on the data directory. My very bad.

escol2006
Glad you tracked it down. Maybe we should create a bug report since the two processes (add / check-in) work differently

-Jon