I have installed the tern_fields module.

I have added a term field to the taxonomy vocabulary. The specification of that field is.

type: File widget: image

Now when I try to upload an image for a taxonomy term, it works fine for the admin but when I try to upload an image for a taxonomy term as a site manager then it gives me the following error.

The selected file Little Steps.jpeg could not be uploaded. Only files with the following extensions are allowed: png|gif|jpg|jpeg.

Where the site manager is a user role. and in the permissions for the site manager against the term_fields module, both check boxes are checked. administer term_fields and upload term files.

what is the problem now?

Comments

b-prod’s picture

Category: bug » support
Status: Active » Fixed

Hi!

It seems that it is due tu a misconfiguration in your Drupal file system. For the main user, no validation is performed against file extensions. But for other users, a check is made to verify that the uploaded file matches the allowed extensions defined in the Drupal administration.

The message you get specifies the folowwing extension "png|gif|jpg|jpeg". The separator is not correct, it should be a coma: "png,gif,jpg,jpeg". You can easily modify that in your Drupal admin UI in the file section.

hmdnawaz’s picture

It should not be a comma, It should be a space. As I have tried with the comma also but was getting the same error.
So I tried with the space between the extensions like "jpg gif png" and it worked for me.

Thanks for your reply.

b-prod’s picture

You're right, it is a space. Thanks for pointing this mistake :-)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.