FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Images uploaded don't show up in message
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Images uploaded don't show up in message [message #168919] Thu, 08 August 2013 17:09 Go to next message
TheDude is currently offline  TheDude
Messages: 120
Registered: November 2012
Location: France
Karma: 2
Senior Member
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.


[Updated on: Thu, 08 August 2013 17:09]

Report message to a moderator

Re: Images uploaded don't show up in message [message #168920 is a reply to message #168919] Thu, 08 August 2013 18:30 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Caused by patch @ http://fudforum.org/forum/index.php?t=msg&goto=167755

I'll prepare a fix.
Re: Images uploaded don't show up in message [message #168925 is a reply to message #168920] Fri, 09 August 2013 14:37 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Fixed at http://sourceforge.net/p/fudforum/code/5637/
Re : Re: Images uploaded don't show up in message [message #168929 is a reply to message #168925] Fri, 09 August 2013 15:43 Go to previous messageGo to next message
TheDude is currently offline  TheDude
Messages: 120
Registered: November 2012
Location: France
Karma: 2
Senior Member
Awesome ! Will it be included in the next RC, then ?

Re: Re : Re: Images uploaded don't show up in message [message #169063 is a reply to message #168929] Mon, 19 August 2013 19:06 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
It's in FUDforum 3.0.5RC1 and subsequent releases.
Image file is corrupted on download [message #184861 is a reply to message #168919] Tue, 11 February 2014 20:04 Go to previous messageGo to next message
wferguss   Canada
Messages: 11
Registered: December 2013
Karma: 0
Junior Member
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?
Re: Image file is corrupted on download [message #184879 is a reply to message #184861] Thu, 13 February 2014 05:02 Go to previous messageGo to next message
rshannon is currently offline  rshannon
Messages: 18
Registered: August 2002
Karma: 0
Junior Member
Also having this problem. Wondering where the images are stored. In a directory, in the DB?
Re: Re : Re: Images uploaded don't show up in message [message #184881 is a reply to message #169063] Thu, 13 February 2014 05:57 Go to previous messageGo to next message
rshannon is currently offline  rshannon
Messages: 18
Registered: August 2002
Karma: 0
Junior Member
I am still experiencing this issue in 3.06RC2.
Re: Image file is corrupted on download [message #184888 is a reply to message #184879] Thu, 13 February 2014 15:11 Go to previous messageGo to next message
wferguss   Canada
Messages: 11
Registered: December 2013
Karma: 0
Junior Member
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.
Re: Image file is corrupted on download [message #184889 is a reply to message #184888] Thu, 13 February 2014 15:38 Go to previous messageGo to next message
wferguss   Canada
Messages: 11
Registered: December 2013
Karma: 0
Junior Member
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 [message #184890 is a reply to message #184889] Thu, 13 February 2014 18:14 Go to previous messageGo to next message
wferguss   Canada
Messages: 11
Registered: December 2013
Karma: 0
Junior Member
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 [message #184893 is a reply to message #184890] Thu, 13 February 2014 20:54 Go to previous messageGo to next message
wferguss   Canada
Messages: 11
Registered: December 2013
Karma: 0
Junior Member
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...

[Updated on: Thu, 13 February 2014 21:01]

Report message to a moderator

Re: Image file is corrupted on download [message #184985 is a reply to message #184893] Sat, 22 February 2014 09:13 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Maybe we should remove all PHP closing ?> tags from all plugin files.
Will update it later today.
Cannot download files from forum [message #185180 is a reply to message #168919] Thu, 06 March 2014 16:37 Go to previous messageGo to next message
xupetas is currently offline  xupetas   Portugal
Messages: 10
Registered: March 2014
Karma: 0
Junior Member
Hello,

I have several files attached to one post, and when i click on them i get a empty page.
If i copy/paste the link (URL of the empty paste) on a new browser window, the download starts without any problem.

I have a opensuse 12.2, php5-5.3.

Can you help please?

Nuno
Re: Cannot download files from forum [message #185181 is a reply to message #185180] Thu, 06 March 2014 17:00 Go to previous message
xupetas is currently offline  xupetas   Portugal
Messages: 10
Registered: March 2014
Karma: 0
Junior Member
I've been checking the logs and i find a 403 http code (denied).

xxx.xxx.xxx.xx - nuno [06/Mar/2014:16:45:37 +0000] "GET /index.php?t=getfile&id=811& HTTP/1.1" 403 - "xxxx" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:27.0) Gecko/20100101 Firefox/27.0"

If i copy/paste it works and i get no 403.

Thanks.

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: flood check reset
Next Topic: Error in confirmation email in Greek Language
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 04:42:03 GMT 2024

Total time taken to generate the page: 0.02356 seconds