Please Log in or Create an account to join the conversation.
beyondlaw wrote: Hi there,
I have installed the CB Ajax File Field plugin successfully and tested a file upload.
As expected, it uploads to plug_cbfilefield/USERIDNUMBER. Instead of creating folder names with USERIDNUMBER, is it possible to rename with the registered username or userfirstnameuserlastname?
Thanks!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
w8ing4u wrote: I've managed to have CB file field create folders with both USER ID and Name, so it's still unique and it hasn't caused trouble so far. The final result is:
"ID_Firstname Lastname".
But make sure you have some rule in the form where your users have to enter their first and last name. If you allow special characters, you may have problems with the directory name... In that case, you may opt for "USERID_USERNAME"
What I did was just searching the php file for any string containing the path to the folder (images/comprofiler/plug_cbfilefield) and add '_' . $user->name . to the previous $user->id
I'd like to do the same with the file names in order to have:
"cb_field name" (not the names the user decides to give his file) underscore "full name" , but it doesn't seem to be working as the system truncates spaces in the name
Please Log in or Create an account to join the conversation.
Why would you want this? I guess just for folder inspection purposes.
But if your users change their last or first name of username you will break access to the files.
Please Log in or Create an account to join the conversation.