Attachments issue

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
dookerix
Registered User
Posts: 3
Joined: Mon Nov 01, 2021 6:21 am

Attachments issue

Post by dookerix »

Hi,

I have a following issue - attachments are not showing

I migrated an quite old forum to newer version and got it all running up and well. But attached pictures in posts are shown as black - dimensions are correct, network request returns nicely 200, entry exists in database, file exists in file system yet the image itself is blank

https://aircooledclub.ee/foorum/downloa ... &mode=view - this is an example

Does phpBB encode/decode the images somehow? As the hash named files don't seem to be regular image files

Any leads or ideas where to start debugging?
Last edited by thecoalman on Mon Nov 01, 2021 12:41 pm, edited 1 time in total.
User avatar
AmigoJack
Registered User
Posts: 6108
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Attachments issue

Post by AmigoJack »

I've inspected 2 files and none of them contains the byte 0x0d, while the JFIF structure looks valid. I conclude: you transfered the files thru FTP in text mode instead of using binary mode - FTP turned every "linebreak" from Windows (0x0d 0x0a) into Unix (0x0a), which only makes sense for text files and otherwise corrupts any binary file.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Attachments issue

Post by warmweer »

dookerix wrote: Mon Nov 01, 2021 6:30 am I have a following issue - attachments are not showing

I migrated an quite old forum to newer version and got it all running up and well. But attached pictures in posts are shown as black - dimensions are correct, network request returns nicely 200, entry exists in database, file exists in file system yet the image itself is blank
...
What do you mean with "migrated" : upgraded ? or moved to a different location (even a different directory). If it was moved , did you transfer the attachments in binary mode? see: https://www.phpbb.com/support/docs/en/3 ... filezilla/)
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
dookerix
Registered User
Posts: 3
Joined: Mon Nov 01, 2021 6:21 am

Re: Attachments issue

Post by dookerix »

The forum has "traveled" for years from one server to another. Really cannot recall how the files were transferred at some points

But yeah it makes sense that without extension files got treated as text files instead of binary
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5871
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Attachments issue

Post by thecoalman »

dookerix wrote: Mon Nov 01, 2021 12:07 pm But yeah it makes sense that without extension files got treated as text files instead of binary
No it doesn't make sense because binary is safe for both. In fact if you are using SFTP it's binary only.

There may be others but Filezilla is the only FTP client I'm aware of that defaults to ASCII if there is no extension.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
dookerix
Registered User
Posts: 3
Joined: Mon Nov 01, 2021 6:21 am

Re: Attachments issue

Post by dookerix »

Just to summarize - ofc I was using FileZilla. But lucky enough I found whole server droplet backup and I was able to get all the attachments original states, after uploading new pack everything seems to work fine (this time in binary mode, not auto)

So yes - file corruption was the case

Thanks everyone for discussion and pointing out the issue
User avatar
Forex Station
Registered User
Posts: 177
Joined: Thu Apr 06, 2017 2:26 pm
Location: Australia
Contact:

Re: Attachments issue

Post by Forex Station »

dookerix wrote: Thu Nov 04, 2021 5:47 am So yes - file corruption was the case

Thanks everyone for discussion and pointing out the issue
It's working for me now. Nice site by the way 👌
Highly-customized PhpBB board voted as one of the most influential trading sites in the world: forex-station.com 💬
User avatar
AmigoJack
Registered User
Posts: 6108
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Attachments issue

Post by AmigoJack »

Comparing one old corrupted file (top) and its correct version (bottom) you see that indeed the 0d byte was missing:
20211107 ftp diff.png
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
Post Reply

Return to “[3.3.x] Support Forum”