Uploaded zip file is renamed

AI-generated summary

Uploaded zip file is renamed

A discussion about a Discourse issue where uploaded zip files are being renamed to <GUID>.zip upon download. HappyGezim reported the issue, suspecting a possible installation compromise or a change in behavior. xrav3nz confirmed it’s a bug, linking to a relevant meta discourse topic, and suggested updating to the latest instance to fix the issue. michaeld clarified that updating would indeed fix the issue for existing uploads. Ivan_Rapekas shared a similar experience with the issue persisting in certain cases, even after updating to the latest Discourse image. codinghorror demonstrated a successful upload with the correct filename, advising users to update their instance to the latest code to resolve the issue.

I uploaded files named zip-recipes-friend.zip but when users download the file, it’s name is <GUID>.zip.

I’m fairly certain this is new but not 100% sure. Did my installation get compromised or was this a change that actually happened?

If this is an intended behaviour, what’s the reason behind it?

2개의 좋아요

This is indeed a bug,

and it should have been fixed by @zogstrip!

Could you try upgrading your instance to latest and see if the problem persists? (since this won’t automatically fix the filenames of existing uploads, my bad, misread a followup on the linked topic, see @michaeld’s comment below)

2개의 좋아요

yes it does, this is not about how it’s being stored but what filename is communicated to the browser upon download.

3개의 좋아요

I do a migration from one forum engine to Discourse and this problem has been following me since beta9 approximately. Seems that only new deployed image is free of the problem of the naming of downloaded files.

Actually, I don’t know where I did a mistake, and how to report this problem right way. I just deployed the latest Discourse image, then migrated attachments from an old forum to the new one via API, then both migrated and new uploaded files are downloaded with <hash> in the filename.

I know, my case is specific, therefore my post is just a little confirmation that the problem still persists in some cases.

Let’s see. Here’s a text file I uploaded called funky-biscuits.txt.

funky-biscuits.txt (18 Bytes)

All correct on our end. So you need to update your instance to latest code.

3개의 좋아요