Unable to Download Attachments after Direct File System Manipulation
Symptoms
After copying attachment files into the correct location on disk (using the schema in the Hierarchical File System Attachment Storage), the attachment is invalid after download.
Cause
The file size is recorded on the ATTACHMENTS table in the database, not from the file size on the file system. When downloading, it retrieves a partial download, equivalent to the byte size from the database record.
Resolution
Do not upload different attachments in place of existing ones. See How to add multiple attachments to a page at once for tips on how to bulk upload attachments.