Loading...

Attached images are downloaded, can they be opened instead? | Forum

advertisement

Log in or join to remove this advertisement (?)

Topic location: Forum home » Non-beard Forums » Conversation
itsworking
itsworking Apr 19

Hi all,

I was wondering if there's any chance that we could have attached images open in a new tab instead of being downloaded to the computer? It's so much more convenient to just view the images in the browser and not having to clean up the downloads folder filled with a bunch of dude's beards :)

Cheers

1 0 +1
Cemmos Team
Cemmos May 15

Hey hey,

Sorry for not replying to this for a while. That's a known issue with the software at the moment, and something I've brought to the attention of the software developers a couple of times. It's something that they've put down, but I'm not sure when it'll be fixed.

I attempted it myself a while ago, but the code is a bit intricate and works alongside Amazon S3, which is where the problem begins. I know what it is, but I'm personally not able to fix it.

Let's hope they get this fixed soon, because it has been a while since I reported it. But the software devs for this software are fairly stagnant, so things happen pretty slowly (one regret for not choosing something else).

1 0 +1
itsworking
itsworking May 15

Cemmos  Cheers for replying! I'm actually a web dev myself and I've looked at the Oxwall source code, it shouldn't be too much work to fix it I reckon. It's just about adding a Content-Type to the S3 putObject call, as I understand it? The only downside would be that you'd have to fix it by monkey-patching the actual library, so it would be overwritten whenever you update the system, but I understand if you're reluctant to do that. You could probably just use a static "image/jpeg" Content-Type for all uploaded images, even if they're actually e.g. PNG, the browser would just open the image as a JPEG when it receives it from S3 anyways unless I'm completely mistaken.

1 0 +1
Cemmos Team
Cemmos May 15

Yeah, I considered defaulting the content type, but I'm unfamiliar with the security implications of using incorrect MIME types (not to mention Google and other search engines may decide not to index incorrect file types). It's not really my area though.

I don't mind making a core change here and then, I do keep track of those in upgrade docs. It's a hassle, but worth it when you need to get something changed/fixed. 

0 0 0
itsworking
itsworking May 15

Cemmos  I don't think there's any security issues with faking the MIME type and to my knowledge Google doesn't penalize image search results with an incorrect MIME type. It's simply an indication to the browser of how to decode the data, but browsers these days understand that coders are morons ;) and essentially figure out themselves what format it is! I'd say go for it if you're feeling lucky, can't say that I know of any potential issues with it.

1 0 +1
Cemmos Team
Cemmos May 15

These days I think MIME types matter more than they used to, since search engines are now able to crawl and read metadata of images. I think in the past it was less of an issue. I'll have to dig into it some more. I don't have too much of a problem with images from the forum being indexed, but it would affect everything uploaded to the site that gets sent to AWS with the (incorrect) headers.

Probably not as much of a problem as I'm thinking. So long as it's not a penalty, I'd probably be fine with using the wrong MIME type.

1 0 +1
Log in or create a beard profile to reply, it's fast and easy!
Amazon International Links — Beard Equipment:
United States · Canada · Germany · United Kingdom · France · Italy · Spain

Search Beard Profile