Uploaded PDFs, when downloaded get error saying corrupted

I have uploaded pdf file to the site via the file upload option, when I try to download them I get a pdf error that the file may be corrupted or wrong type.  I can;t figure what this is as the pdf opens OK normally, is this an elgg issue or a pdf issue, can I FTP the files instead?

  • Have you tried this with a small (less than say 50k) pdf file? We've found that larger files seem to have problems. I don't specifically know if elgg has a limit, but we seem to have encountered it. You might be able to upload it, but the directory structure is "unusual". There is a discussion of that directory structure in this post:

    http://community.elgg.org/mod/groups/topicposts.php?topic=390431&group_guid=52477

    It is near the bottom. I had asked the question of where the files were stored in elgg. Hope this helps.

  • The filesize limit isn't part of Elgg but part of the PHP and web server settings. Check out the .htaccess file for these values.  You might also need to change them at a system-wide level.

    The directory structure is required on larger sites because filesystems have a limit on the number of entries in a single directory.  We've improved the way it's handled in 1.7 by basing it on owner creation time instead of owner username.

  • Is there a way to implement the upload, so that the file plugin first recognizes the size of the file being uploaded, either accepts or rejects it, based on size and possible other parameters, and then confirms that all kilobytes were uploaded?  That would be quite nice!  ;-)  Unfortunately, most users would just assume that the file was fully uploaded and walk away from it.  Then another user would come along to download the file and assume it is okay and yet it was corrupted or incomplete.

  • It is indeed possible.  I believe Cash fixed this in 1.7.

  • Hmmm...I don't remember. I know I did this for Tidypics. I don't think I added an error check to the file plugin. I did add the ability to upload a file to replace a previous version. Not too difficult to add the error check.

  • Ahh maybe that was what I'm thinking of.  I'll have a look at some point...if not I'll add it.  Would definitely be something worthwhile...

  • Thanks, guys!!!  :-)