• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed  Txt files not attach

Jake Bunce

XenForo moderator
Staff member
#2
I tested this using a couple of random txt files. I confirmed the problem on very short txt files. But it works when I add more content to the file. So this problem might be related to the length of the file.

I started by testing "test.txt" which contained only the 4 character word, "test". It gave me an error when trying to upload that file. Then I added several more lines to the file and it worked.

The "htaccess.txt" file worked fine.

Also note that the attachment system allowed me to upload the same file twice (htaccess.txt). A duplicate check might be a good idea.

Firefox 3.6.8
Mac OS X 10.6.4
 

Attachments

Mike

XenForo developer
Staff member
#3
And yes, we're aware of the lack of a thumbnail (actually, we just need a "this doesn't have a thumbnail" thumbnail).
 

Enigma

Well-known member
#4
And yes, we're aware of the lack of a thumbnail (actually, we just need a "this doesn't have a thumbnail" thumbnail).
Read the contents of the file and use GD to create a thumbnail representing the top left corner of file when viewing it in a text editor. :D I was just kidding, but now that I think about it, I'm kinda halfway serious. Could be a nice touch.
 
F

Floris

Guest
#5
And yes, we're aware of the lack of a thumbnail (actually, we just need a "this doesn't have a thumbnail" thumbnail).
Or a nice icon that is 'we dont have that', with an icon in front of it, so you can visually see it's .txt or .zip.
That will look smexy.
 

Mike

XenForo developer
Staff member
#6
Weird. Looks like getimagesize() throws a notice/warning if the file is too small. Fixed locally now.