Is more control over File plug-in

10 years 4 months ago #238563 by erichf
Is more control over File plug-in was created by erichf
We need to add the ability for our users to upload one or two MP3 files to the server and we've discovered the Ajax File Field plugin which provides that functionality. I have a few questions about it's use.

1. Is it necessary for the files to be renamed in the process of uploading? It appears that a random number is being added to the end of the file name. Can we comment out that code so that the original file name is intact?

2. We'd like to arrange the files differently rather than by user name. I wondered if we could use an AutoAction to do this but I don't see any triggers available in AutoActions. Is there some way we can change the file storage method without hacking the core code of the plug-in?

3. Can we override cb.filefield.php or do we have to modify it and re-apply patches after updates?

4. We're trying to arrange the files based on another field in their user profile. Is there a better plug-in for accomplishing this or should we look for an extension outside of the CB framework?

Thanks

Erich

Please Log in to join the conversation.

10 years 4 months ago #238572 by nant
Replied by nant on topic Is more control over File plug-in
Suggestion: As you are a Developer member you can download CB 2.0 b1.

This is not for live sites, but you can test the new mp3 file field type that is built in and comment on its functionality.

This way we can improve it if needed.

Please Log in to join the conversation.

10 years 4 months ago #238581 by erichf
Replied by erichf on topic Is more control over File plug-in
Thanks Nick. I'll try to take a look at it over the holidays when I can set up a test environment.

What's the time estimate for a final release? I'm guessing that it's Spring or early summer?

Please Log in to join the conversation.

10 years 4 months ago #238584 by krileon
Replied by krileon on topic Is more control over File plug-in

1. Is it necessary for the files to be renamed in the process of uploading? It appears that a random number is being added to the end of the file name. Can we comment out that code so that the original file name is intact?

Yes, this is necessary for security reasons. It prevents filename guessing and removes filename based vulnerabilities. No you shouldn't comment it out and we can not assist you with doing so if you choose to do so.

2. We'd like to arrange the files differently rather than by user name. I wondered if we could use an AutoAction to do this but I don't see any triggers available in AutoActions. Is there some way we can change the file storage method without hacking the core code of the plug-in?

No, the storage is specific the way it is to remain unique, user specific, and prevent folders from overloading with too many files. It's bad practice to store all the files in a single directory.

3. Can we override cb.filefield.php or do we have to modify it and re-apply patches after updates?

You could have to modify it with each update, but this plugin is deprecated by CB 2.0 as the file fieldtype is now built in as a core fieldtype.

4. We're trying to arrange the files based on another field in their user profile. Is there a better plug-in for accomplishing this or should we look for an extension outside of the CB framework?

You should probably develop a new plugin to better fit your needs or using a separate extension that better fits your needs.

Thanks Nick. I'll try to take a look at it over the holidays when I can set up a test environment.

Nick is referring to the new Audio fieldtype that allows upload and playing of the audio files directly on your site. So if you need to actually download the audio files then this may not be the best solution for you.

What's the time estimate for a final release? I'm guessing that it's Spring or early summer?

Stable will probably be out early January.


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.212 seconds

Facebook Twitter LinkedIn