Jump to content

Validating the image file


This topic is 4733 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I'm not following what you're trying to do and what isn't working for you. Could you re-write your question? Is this a question about SuperContainer?

Hi Smef,

I have a Container field. It is purpose of upload the images.

In this Container field must allow *.jpg, *.gif, *.png formats. Other than these extension like *.jpeg, *.pdf, *.doc files(Because Container field can allow all these formats of files)should not allowed in the container field. Because i need only images in that container field. It's like Validate the file format.

I'm not aware of Super Container field. Is it possible in Super Container field.

Link to comment
Share on other sites

You can write a script using the companion plugin to control uploads and check a filename for .jpg, .gif, or .png and prevent users from uploading files without these extensions, but keep in mind that it is possible to rename an image file to not have one of those extensions, and it is possible to rename a non-image file to have one of those extensions.

Link to comment
Share on other sites

You can write a script using the companion plugin to control uploads and check a filename for .jpg, .gif, or .png and prevent users from uploading files without these extensions, but keep in mind that it is possible to rename an image file to not have one of those extensions, and it is possible to rename a non-image file to have one of those extensions.

Thanks Smef.

Link to comment
Share on other sites

This topic is 4733 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.