[#6116] Rename uploaded file

7 years 8 months ago - 7 years 8 months ago #284047 by wrongjon
[#6116] Rename uploaded file was created by wrongjon
Hi
We want users to be able to upload a resume/cv upon registration

So we've switched from using chrono forms to using a CB file upload field type

But we really need the file to have the users first and last name in it as we have a feature that allows managers to send referrals that zips up multiple users details and resumes so its much easier to identify whose cv is whos in a big list of files when it has their name in the filename.

Could this be done after file upload maybe using auto actions? do you have an example of this please?

Please Log in to join the conversation.

7 years 8 months ago #284054 by krileon
Replied by krileon on topic Rename uploaded file
You'd need to rename the file and update the database with the new filename. I suppose CB Auto Actions could do it using a Code action if you coded such usage, but out of the box no.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

7 years 8 months ago #284058 by wrongjon
Replied by wrongjon on topic Rename uploaded file
Thank you for the quick reply - much appreciated.

Would be really great if Nick could do an auto action tutorial for such an event....

Even better would be to add more options to the file field type allowing the user to OPTIONALLY override the filename and enter a name format that allowed fields values to be merged in as well such as

file name format = "Resume-[firstname]-[lastname]-[userid].[suffix]"

I'm sure many would that that feature :)

Please Log in to join the conversation.

7 years 8 months ago #284067 by krileon
Replied by krileon on topic Rename uploaded file
Highly unlikely to see a tutorial for this. It requires customized PHP likely specific per install. A parameter to override the filename I agree would be a good addition and have added a feature ticket for it as follows.

forge.joomlapolis.com/issues/6116


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

7 years 8 months ago #284069 by wrongjon
Replied by wrongjon on topic Rename uploaded file
That's great - thank you

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.199 seconds

Facebook Twitter LinkedIn