Docs: Attachments are corrupt
- This topic has 5 replies, 3 voices, and was last updated 6 years, 3 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.
Files attached to Docs are not making it through the upload process in a format that can be read by their respective default programs. This has been true for .xlsx and .jpg files so far.
An end user created a doc, then added a file attachment. When the attachment was tested, it seemed to download just fine and file size appears to be about right. But when opened, we get an error message from the target program saying the file is not formatted properly, or is corrupt. Message varies with the program.
I’ve had the same results with .xslx and .jpeg files
Based on this thread, I tested by uploading a .xlsx file via the Media upload in WordPress. That file was fine. I downloaded it and opened it without issue.
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):
Format of link to the file in media library is:
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 tried changing some file permissions (made bp-docs 777) but to no avail. I have considered that there may be ownership issues as well, but I’m just not sure where to start with a fix.
I sure hope someone can help!
BP and Docs were installed by me as individual programs, and then I installed CBOX, which has now hidden when version of those plugins I have, but I assume it’s the most current, since CBOX is up to date.
We are planning CBOX v1.0.8 due on the first week of June that updates a few plugins.
One of those plugins is BP Docs. It is possible that you are running a slightly, older version.
About the hidden plugins, by default, CBOX hides the plugins we recommend from the main “Plugins” list. However, there are occasions where you might want to manually update a plugin.
To find out how you can unhide these plugins, view this article:
If you decide to manually update BP Docs and you still run into problems, please reply back.
Thanks Ray. Will it be easiest to learn of the updated CBOX via my own plugins page? or will there be an announcement somewhere I should be following?
I updated CBOX and the fix for this issue is partial.
PDFs are now working….I can download them and they can be opened in a variety of target programs.
JPGs are not working. The same error above remains.
I did notice something else this time:
After clicking the button to add an attachment, the screen I see is blank (there are no files displayed) and there is a button to “Select Files”. When clicked, it changes color (different shades of gray) but has no obvious effect. If I drag a file onto this screen, it will upload. And after uploading, I can see all the other files that were previously attached to the doc.
I get the impression this screen was designed to allow one to select a previously uploaded file from the Media folder, but it’s not working that way.
Thanks in advance for any help with this!
Hi, just checking in. I noticed that someone else on the WP forum reported corrupt file attachments. Any help/hope?
Hi Marci @marci
I just tested the upload process on my cbox 1.8 test site and everything worked fine for me. I was able to upload and view a jpg file and a pdf file.
After you click “Select Files” you should be presented with a list of your files, and you should be able to navigate to the file you want to upload.
You might want to turn on some web debugger like Firebug to see if you see any errors/clues.
Hope this helps.