Login

russian armor

JPG file upload incorrect

2 Aug 2013, 17:35 PM
#1
avatar of scratchedpaintjob
Donator 11

Posts: 1021 | Subs: 1

if you want to upload an image entitled desktop.jpg it works, if it is entitled desktop.JPG, it doesnt show the website, but gives you just the option to download it.

http://www.coh2.org/file/2121/desktop4.jpg
works!
www.coh2.org/file/2120/desktop3.JPG
doesnt work!
its the same exact picture!
2 Aug 2013, 17:36 PM
#2
avatar of scratchedpaintjob
Donator 11

Posts: 1021 | Subs: 1

and it would be very good to have the option to delete files you dont need anymore
2 Aug 2013, 17:38 PM
#3
avatar of Qvazar

Posts: 881

What is this, you can upload files?
Edit: nice, never saw that feature before, and I've even been in that menu countless times!
2 Aug 2013, 18:08 PM
#4
avatar of cr4wler

Posts: 1164

wihtout looking into it any further, i'd guess it's the same problem as downloading replays with IE (wrong content-type in header).
10 Oct 2013, 11:56 AM
#5
avatar of cr4wler

Posts: 1164

*bump*

error still present... i actually took the time to look into it, and whats wrong here is the content-disposition: it's inline for lower case jpg and its attachment for upper case JPG. should be a 2 line fix in apache config.
Seb
26 Mar 2014, 23:47 PM
#6
avatar of Seb
Admin Black Badge

Posts: 3709 | Subs: 2

It's a bit more complicated because they are not served directly but go through xSendFile.

But yeah in practice, the config of that just said that forceDownload was false for only 'jpg', 'gif', 'png'.

I'll add strtolower around the extension check. Is there other file types that shouldn't be downloaded while we're at it?

And why do I even need to define that on the server, wouldn't it be more logical for each browser to decide what to do with each type?
27 Mar 2014, 07:19 AM
#7
avatar of cr4wler

Posts: 1164

i don't know the exact intricacies, but my guess is:
IF you send a content-disposition type, the browser respects what you tell him (and in this case displays the raw data). if you DON'T send a content-disposition (and/or the type is not application/octet), the browser will fall back to some sort of default he has set for certain file/content types.
Seb
27 Mar 2014, 17:43 PM
#8
avatar of Seb
Admin Black Badge

Posts: 3709 | Subs: 2

Thanks !

I've fixed it for uppercase jpg, png and gif.

All others are still attachment.
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

840 users are online: 840 guests
0 post in the last 24h
8 posts in the last week
34 posts in the last month
Registered members: 49113
Welcome our newest member, Dedek545
Most online: 2043 users on 29 Oct 2023, 01:04 AM