/    Sign up×
Community /Pin to ProfileBookmark

file upload: bad/type

I have a php upload script, but for some reason i keep getting a bad/type mime when i try to upload a csv in firefox (only). I’m quite sure this might be an issue to do with the browser. As far as i know, the mime detection is done in the browser.

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@NogDogSep 08.2009 — Not entirely sure what you mean, but if you are detecting the "type" via the $_FILES['userfile']['type'] array element, (a) the browser is not required to send it, and (b) it cannot be trusted in any case since it can easily be spoofed.
×

Success!

Help @toenailsin spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...