Tried taking that test a step further:
– uploaded a file in admin (media >> library)
– downloaded and opened, it’s just fine
– under media >> library I chose to “attach” the file to a doc
– went to doc on the frontend, attachment is displayed in the list
– tried to open attachment from the link on the doc page, got an error message: file does not exist
Permalink to file shows a page with just the download link on it. Download link works: file exists and is not corrupt.
Format of download link is (same as the format of the link to the file that was uploaded from the frontend):
https://domain.org/community/docs/doc_name/?bp-attachment=FILE.xlsx
Format of link to the file in media library is:
https://domain.org/community/wp-content/uploads/2014/05/FILE.xlsx
Summary:
When file is uploaded on the wp backend, the file is good — but when attached to a doc, it “doesn’t exist”.
When a file is uploaded from the Docs interface, it can be downloaded (and appears to have the correct file size) but it’s read as “corrupt” by it’s associated program.
—
I could be way off base here, but I’ve been having some issues with file ownership. We ended up making the entire plugins folder owned by me (my FTP username), instead of WP, and I’ve been doing all my uploads and installs manually (FTP).
Does this plugin rely on ownership to grant permissions? Maybe WP needs ownership.