Post by xupetas is ignored |
Post by xupetas is ignored |
|
Re: Image file is corrupted on download |
Thu, 13 February 2014 15:54 |
|
Hm. When I went to propagate the fix to my production instance, I had to apply the fix to a different plugin file (the plugins were listed in a different order in the plugin_cache file - in both cases it was the last one that needed to be fixed). But on my test instance, that file does not have a blank line at the end of it. Not sure how this blank line is getting into random files...
|
|
Re: Image file is corrupted on download |
Thu, 13 February 2014 13:14 |
|
Figured it out, at least for my case. There was an extra linefeed at the end of the ckeditor.plugin file, which was being sent to the output buffer before the attachment file. If you're not using this plugin it might be something similar from another source.
I found it using debug statements that printed the length of the output buffer. In getfile.php, the output buffer length was 1 before the readfile command. I kept moving them backwards through the code until I found the point where the extra data was getting inserted, which was when the plugin file was included.
|
|
Re: Image file is corrupted on download |
Thu, 13 February 2014 10:38 |
|
Looks like the same 0x0A character gets tacked on for text files and PDF files too, but in those cases it doesn't prevent the file from opening.
|
|
Re: Image file is corrupted on download |
Thu, 13 February 2014 10:11 |
|
Attachments are stored in the fudforum-data directory (wherever you configured that to be), under "files". If you can query the db, the path to a given attachment file is in the "location" field of the <prefix>_attach table.
|
|
|
|
Image file is corrupted on download |
Tue, 11 February 2014 15:04 |
|
I'm running FUDforum 3.0.5.
When I attach a txt file to a message and click to download it, everything is fine. If I do the same with an image file (eg. jpg) the download fails. In IE and Chrome it displays a broken image link, in Firefox it shows "The image "http://.../index.php?t=getfile&id=1&" cannot be displayed because it contains errors"
I used wget to download the file and looked at the raw data - 0x0A has been prepended to the beginning of the file (although the file size hasn't changed from the original - the end has been cut off). This 0x0A is not present in the attachment file on disk.
How is this extra data getting tacked on to the image file during download, and how do I make it stop?
|
|
|
|
|
|
Images uploaded don't show up in message |
Thu, 08 August 2013 13:09 |
|
I think I'd create a topic for this, because it happens with 3.0.5 and didn't in 3.0.4
When you upload a photo you can't make it appear in the message itself when you click on insert file in message.
|
|