Ajax file uploads storage and renaming

9 years 11 months ago #245144 by webcoachonline
Ajax file uploads storage and renaming was created by webcoachonline
Hello,

I have installed the Ajax file uploader and would like to know where the uploaded files will be stored in the server.

My members are organizations and we require the upload of by-laws and constitutions.
These files would only be visible for administrators (with CB_Privacy).

But we also require the upload of the member's annual reports.
These uploaded reports (PDF only) would be shown publicly in a file-listing module.
That is why I would like to know:

1.- Where the uploaded files are stored
2.- If they are separated by upload field (or all the user uploaded files are in the same folder)
3.- If the file names are changed at upload and if a change name rule can be set up on the upload by field. For example, the uploaded file would be renamed "member-name-year-annual-report.pdf" for the annual report and for the constitution it would be "member-name-constitution.pdf"

Thank you for the support,

Please Log in to join the conversation.

9 years 11 months ago #245156 by krileon
Replied by krileon on topic Ajax file uploads storage and renaming

1.- Where the uploaded files are stored

/images/comprofiler/plug_cbfilefield/USER_ID/

All files are stored to the above. Each user gets their own folder so they're separated by user id.

2.- If they are separated by upload field (or all the user uploaded files are in the same folder)

They're not separated by field, but by user.

3.- If the file names are changed at upload and if a change name rule can be set up on the upload by field. For example, the uploaded file would be renamed "member-name-year-annual-report.pdf" for the annual report and for the constitution it would be "member-name-constitution.pdf"

Names are purged of any possible security vulnerabilities then a unique random id is appended, but the unique id is removed before serving the file for download so a user never notices it. None of this behavior can be changed without altering core code.


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.

9 years 6 months ago #250353 by w8ing4u
Replied by w8ing4u on topic Ajax file uploads storage and renaming
Could you tell me which line/command I should remove to avoid this plugin truncating spaces in the file names? I'm trying to include the user's name to each file name, but as there are spaces between first and last name, it's not working at all, because the system stores the file with spaces (I can see through FTP), but the link created in the user's profile has no spaces and so the file is not found for downloading

Please Log in to join the conversation.

9 years 6 months ago #250501 by krileon
Replied by krileon on topic Ajax file uploads storage and renaming
The filename should not have spaces in it. They should've been removed entirely. Only the following characters are allowed.

a-z
A-Z
0-9
-
_

Is this the case when using the built in File fieldtype in CB 2.0? The CB File Field plugin it self could be bugged. Its been upgraded and merged into CB 2.0 core.


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

Facebook Twitter LinkedIn