Skip to Content Skip to Menu

File Upload Questions

  • Spiralmind
  • Spiralmind
  • OFFLINE
  • Posts: 259
  • Thanks: 16
  • Karma: 0
6 years 11 months ago #299223 by Spiralmind
File Upload Questions was created by Spiralmind
Hello, I have added a file upload in the users profile edit. However I am not sure why it shows this instead of the file choosing button. Can this behavior be changed?



Additionally, I like the rename option but can it be amended with the username-myfilename? Or how does it work for all users to upload a file with same filename? Do they go in separate folders or get a prefix/suffix on them from the system by default? This is a really cool feature that I am super happy is there. I want to keep these consistent and wow there it is!

Thank you
Attachments:

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 11 months ago #299228 by krileon
Replied by krileon on topic File Upload Questions
It shows a dropdown because the field isn't marked required so it needs an option to not ask them to upload. Mark it required if you want to force them to upload a file otherwise that behavior can not be changed.

Additionally, I like the rename option but can it be amended with the username-myfilename? Or how does it work for all users to upload a file with same filename? Do they go in separate folders or get a prefix/suffix on them from the system by default? This is a really cool feature that I am super happy is there. I want to keep these consistent and wow there it is!

The filename parameter just changes how the filename is displayed to the user and how it's attached to the header when downloaded. It will always be stored the same way. Yes, you can use [username]-[filename] for what you're wanting.


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 or Create an account to join the conversation.

  • Spiralmind
  • Spiralmind
  • OFFLINE
  • Posts: 259
  • Thanks: 16
  • Karma: 0
6 years 11 months ago - 6 years 11 months ago #299229 by Spiralmind
Replied by Spiralmind on topic File Upload Questions
Got it, now that I uploaded a file it has more choices which I guess makes sense. They will need to upload this each year or biannually.

The [username] works great.

So can a timestamp or the year only be added as well using PHP?

Where are these files uploaded to? I may want to download them via FTP.

This is really awesome? This system is crazy cool!
Last edit: 6 years 11 months ago by Spiralmind. Reason: Forgot something

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 11 months ago #299230 by krileon
Replied by krileon on topic File Upload Questions

So can a timestamp or the year only be added as well using PHP?

It supports substitutions so you should be able to use the date substitutions. Example as follows.

[username]-[filename]-[cb:date format="Y" /]

That for example would give you tom-my_file-2017.zip. The date substitution can only return a PHP formatted date using today's timestamp though. See the below substitution tutorial for further usage information.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb

Where are these files uploaded to? I may want to download them via FTP.

/images/comprofiler/plug_cbfilefield/USER_ID


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 or Create an account to join the conversation.

  • Spiralmind
  • Spiralmind
  • OFFLINE
  • Posts: 259
  • Thanks: 16
  • Karma: 0
6 years 11 months ago #299233 by Spiralmind
Replied by Spiralmind on topic File Upload Questions
I see, it does not actually rename the file on the server.

Please Log in or Create an account to join the conversation.

  • Spiralmind
  • Spiralmind
  • OFFLINE
  • Posts: 259
  • Thanks: 16
  • Karma: 0
6 years 11 months ago #299235 by Spiralmind
Replied by Spiralmind on topic File Upload Questions
Hello, something odd is happening with this.

I have a checkbox that when checked opens the file upload field. I have this condition set in the file upload field.

display: field conditional self
field: checkbox field above the file upload
operator: not empty
mode: show

It works fine, when I check the box the file upload opens and I can upload a file, but when I press update it reloads and the checkbox is unchecked. It won't stay checked. This is how I have some other fields set to show up and they work. Is there some behavior with the upload that causes this? I tried it required and not reburied no difference.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum