File Upload - Multi Language

Hi,

I have a multi-language website, and like to know how you can make use of the upload field for language based documents (pdf). When i translate a page (copy) and replace the existing file with an other (in this case in french) it deletes the existing file. Is it possible to make this language based? it seems it checks on filename.

best.

Need to ask if I understand correctly the situation: are you using a Grav form to upload a PDF and you want that PDF to have a the current language code appended to it?

eh well, it is just the upload field in the administrator panel. When creating a content page you can attach an image, or a file, it looks like it is not creating the file for the language specifically, but just for that specific page. So when i have the page in english and french, and i upload a PDF for english, and copy it to translate it to french, when i replace the pdf for the french version, it removes the english pdf version. Hope you understand my situation now ? ;D

Ok I guess you are always uploading with the same filename. Admin does not check if the filename already exists with file uploads.

I fixed the issue in https://github.com/getgrav/grav-plugin-admin/commit/acfe5e59542493e27b5f0c704942a4ac5d9732d8 now. Until the next release, simply add the language name to the PDF file to avoid overwriting.

Ah ok, Thanks @flaviocopes, it was my plan to do a custom check, but you already have a temporary solution. thx!