uploaded audio files are renamed to field name

6 years 5 months ago #299200 by ckpmedia
on my site each member (mostly voice actors) can upload a small voice demo (like John-Doe-VO.mp3. When I look into the folder on my server (comprofiler/audio) i see all the uploaded mp3 files but they are all renamed with field name and a random character string (cb_vo1_85_5a0e5309e1468.mp3). The embedded audio player has a download function and if an ad agency or casting agent want s to download the sample of John Doe (John-Doe-VO.mp3) he gets a file named (cb_vo1_85_5a0e5309e1468.mp3) which does not identify who the actor is. Is there any way to change the file name back to the name that was actually uploaded without breaking the player link?
here is my testing site:
www.ckpvo.com/index.php/user-lists

Thanks
Herbert

Please Log in to join the conversation.

6 years 5 months ago #299208 by krileon
If you're using a file field it will maintain the filename perfectly fine. It will of course be sanitized then a unique id is added to the end. Users won't see the unique id though and when downloaded from the file field on their profile they should receive the file without the unique id added on. You can even customize what the filename outputs as when downloading from the field by adjusting "Filename" parameter within Parameters > Display while editing your file field in CB > Field Management.

You however appear to be using an audio field, which has no need for the original name and so it doesn't maintain it.


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.

6 years 5 months ago #299211 by ckpmedia
Replied by ckpmedia on topic uploaded audio files are renamed to field name
Thanks for your answer but one thing puzzles me:
You however appear to be using an audio field, which has no need for the original name and so it doesn't maintain it.

If someone wants to upload audio (a demo like we do or even a song) why would there be no need to maintain the original name. If I upload 5 songs to your site and you want to check or download them you are OK with "cb_field_5844584" instead of the name of the song? All the mp3 files my members upload go in the same folder and get renamed and are therefore useless.

Are there any workarounds or options to rename them back without breaking the links. Do you think it is possible to use a work around by saving the name of the audio file (Frank-Doe.mp3) in a hidden text field during registration/uploading process and then rename them when downloading? (Probably would require extensive scripting )

Herbert

Please Log in to join the conversation.

6 years 5 months ago #299218 by krileon

If someone wants to upload audio (a demo like we do or even a song) why would there be no need to maintain the original name. If I upload 5 songs to your site and you want to check or download them you are OK with "cb_field_5844584" instead of the name of the song?

Yes, because an audio fieldtype doesn't even provide an option to download it. It just embeds it for playback. Browsers can circumvent this I guess with an extension or by accessing the pages media directly I guess, but as the fieldtype doesn't officially support a means of downloading audio files that is an unsupported usecase.

All the mp3 files my members upload go in the same folder and get renamed and are therefore useless.

Suggest using a File fieldtype if you want to allow download or look into purchasing and using CB Gallery if you need more advanced management of audio files. At this time the audio fieldtype doesn't provide a download option, but have added a feature ticket to look into adding one and at which point the filename code will be adjusted to maintain original filename.

forge.joomlapolis.com/issues/6873


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.

6 years 5 months ago - 6 years 5 months ago #299231 by ckpmedia
Replied by ckpmedia on topic uploaded audio files are renamed to field name
Thanks again I will look at cb gallery.

Actually Community builder's embedded audio player has a download function :) i did not use any external player or plugin and on both, the profile view and the lists your player has a download arrow on the player...to be 100% sure I tested it on your cb demo site....added an audio field and uploaded an mp3 ...I am username hp3250 id # is 259:)

Herbert
Attachments:

Please Log in to join the conversation.

6 years 5 months ago #299281 by krileon

Actually Community builder's embedded audio player has a download function

That's not CB adding that, but your browser. When the download functionality is added (that will work regardless of browser) the filename will be maintained as it is for File fieldtypes.


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.

Moderators: beatnantkrileon
Time to create page: 0.248 seconds

Facebook Twitter LinkedIn