Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Unable to upload a picture to answers, questions, etc.

+2
−0

I'm using Mozilla Firefox. When I try to upload a picture to a question or answer, I get the following error:

error: "Images must be one of png, jpeg, jpg, gif"

However, it would be easy to verify whether or not I have the correct file type for the picture. I'm 100% sure that I'm updating the right file type.

When I use the internet browser's inspector tool and attempt to upload a picture, I get the following response:

Status: 400 Bad Request
Version: HTTP/2
Transferred: 1.24 KB (53 B size)

Is anyone else having this issue? Do I need to copy more specific information? (if so, then please elaborate)? Is the token generated by this request not valid?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

General comments (6 comments)

1 answer

+2
−0

OK. This appears to be a variant of the known image issues. Specifically, it is relying on extension to determine image type, rather than doing an analysis after upload.

However, it appears that SomeOther sites do something very similar, so this is far from a uniquely Codidact problem.

The problem is a bit of a tricky one. Limiting based on extension is a time-honored technique to help filter bad (or just useless) files. On the other hand, it is no guarantee that the files are what they say they are - e.g., an executable masquerading as an image. The solution to that problem is to a check after upload to make sure the content nominally matches the stated filetype.

Until we get a far more sophisticated image upload process, I think this will stay "as is" - but others may be willing to tackle it, so we'll see.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

General comments (3 comments)

Sign up to answer this question »