Jump to content

Recommended Posts

Posted

If I try to upload the same file (an image) to the "files" field AND to the "image" field (for thumbnail generation) on a page.

But if I do that I get an error which says:

Quote

Refused file 4-wochen_erfolg.jpg because it is already on the file system and owned by a different field.

How can I tackle this problem? Is it somehow possible?

Because I need the image for a thumbnail and the file from the files field can be downloaded.

Posted

It won't be possible to store the image with the same name twice because they are bot stored in the same folder in the filesystem.

 

18 minutes ago, jmartsch said:

and the file from the files field can be downloaded

Why can't you download it from the images field?

 

  • Like 1
Posted

I was confused at first of why the test I just made worked (with the same file name being uploaded), but quickly realized why. If you dont have "overwrite existing files" checked in the settings for the two fields, it will allow you to have the same file (appends a -number to the end of the file name). I don't know if having the -number on the file messes how you are calling them in a template, but it is a possible quick workaround.

 

But as adrian said, you could just download from the images field.

  • Like 1
Posted
10 minutes ago, louisstephens said:

If you dont have "overwrite existing files" checked in the settings for the two fields, it will allow you to have the same file (appends a -number to the end of the file name).

Very true, but I assumed he needed/wanted them to have the same name.

Posted

Thank you for your suggestions. @adrian was right, I wanted to have the same file in the files and images field. Now I changed my download function so that it can also accept files from the images field.

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...