Forums

File upload

kraadde 11 Apr, 2024
Uploaded files are renamed in CF8. I.e File "abcd.pdf" is renamed as "_20240411122754.pdf"

Can this behavieur be changed, as I need the files uploaded with the original name.
Max_admin 12 Apr, 2024
Answer
You can enable the "Filename provider" behavior in the file field settings, then use either {file:name} for the original name or better 

{file:safename}.{file:extension}

 for a safe name without the timestamp
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kraadde 15 Apr, 2024
Thanks for the help. Sofar OK, but a new problem:

I am getting an error message wher submitting the form:

  • Error, upload directory does not exist.

But the directory is there! See the attached jpg screenshots.

Please help. Regards


Adriano
01.jpg
02.jpg
03.jpg
Max_admin 15 Apr, 2024
Answer
This is not an absolute path to a directory, the absolute path can be found in Joomla 4  5 by going to:

System > Information > System information > Configuration file

The path will be shown there, but you may also use the ChronoForms8 shortcode for that:



{path:front}

so you may use something like {path:front}/uploads/
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kraadde 15 Apr, 2024
Now it works, but can it be configured to allow uploading a file with same name? ( i.e. updated file)?

Regards

Adriano
Max_admin 15 Apr, 2024
use the following as the filename provider:

{file:safename}.{file:extension}


I think that should overwrite an existing file
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kraadde 15 Apr, 2024
Nope. It gives the same message back: 

  • Sorry, file already exists.
Max_admin 16 Apr, 2024
Ok, I added a new behavior to file fields to "overwrite existing files", this should be available in the next update
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.