Support » Developing with WordPress » Set max. file size depending on mime type

  • Hey, anybody ever tried to limit the maximum file size depending on mime type or at least depending on file extension?

    Users should be allowed to upload large documents like pdfs but not huge images like raw photos.

    Actually we only set a generic upload limit.

Viewing 1 replies (of 1 total)
  • The problem is that the allowed upload size is a server setting, not a WordPress setting, so you’d need to do this at the server level.

    But there’s another problem. A lot of the time the MIME type of an uploaded file isn’t properly known until after it’s been uploaded. So that means that you’d try to force some limit on it after the fact instead of before as it should be.

    And in reality, why shouldn’t we be able to upload large RAW photo files to a website? Sure, they won’t display on most browsers, but you can always add links to the files nd download them somewhere else. ??

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.