How to validate/limit upload mime types

Amila Perera Posted in Technical Support 2 months ago

Hi,
I tried uploading various file types when creating a new post and all those were accepted, I need to validate uploads and restrict only for photos. How can I do that ?

Replies
German ~Z~ Man Replied 1 month ago

Well,
actually Ossn doesn't upload anything else than images inside of a post.
You just stumbled upon a small logic glitch
as basically a post with just an image IS possible
while an empty post is not.

lk Amila Perera Replied 1 month ago

If somebody can help me on this would be appreciated. What I want to do is.

  • Don't allow users to post any images(or any other files) without
    valid exif data.
  • When they try to I need to throw an error.

Thanks in advance

lk Amila Perera Replied 2 months ago

Please see below. When I select zip file it uploads without any error. But when it's posted its becomes an empty post.
How can I restrict this only to post photos with exif data.

I need to accept only photos with exif data and reject other types of files by throwing an error.
Please help me to customize the code to archive this target
Thanks

enter image description here

enter image description here

German ~Z~ Man Replied 2 months ago

Please provide
1. one of these files you were able to upload
2. a screenshot showing that file inside of the post