In my case, I was using the transliteration module to make all file paths lowercase, but it looks like this problem would happen if the path changes for any reason. file_save_data() returns a file object with the path of the file where it was actually saved, and I expect using that path would solve this problem. I worked around it by turning off the lowercase setting in the transliteration module, but wanted to at least document the problem for others running into it.

Comments

plopesc’s picture

Status: Active » Postponed (maintainer needs more info)

Hello.
Are you transliterating manually file names via admin/config/media/file-system/transliteration or are being transliterated during the save process.

If you're doing it manually, you have to consider that those paths are in the database, so changing it manually will led to DB inconsistencies. I know, this is a module fault.

Otherwise, if your paths are being transliterated automatically during the field save process, please add a comment explaining the steps to reproduce the bug.

Thank you