You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#112893 Add a default upload folder to custom field

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Tuesday, 12 September 2023 16:39 BST

GFCOM
Hi Ryan,

This is a feature request :)

I currently need to set default folder for custom field.
For example, I need to create 3 Media JCE Fields that will contains :
- Audio (mp3)
- File (pdf)
- Video (mp4)

And for better organization, I would like to set the default upload folder for :
- field "Audio" to "images/audio"
- field "File" to "images/pdf"
- field "Video" to "images/video"

This default upload folder should be used when display the Media in popup (click "Select") or by direct upload.

I think this kind of configuration would help to a better file management :)

Thank you.

Regards,
Teddy

Ryan
Please try JCE Pro 2.9.34 Beta - https://www.joomlacontenteditor.net/downloads/editor/pro/development

For each JCE Media Field, you can now set a Media Folder value which is relative to the File Directory Path set in the Editor Profile. So for example, if the File Directory Path is images (the default), and the Media Folder values is pdf, then the JCE Media Field will use images/pdf as the base folder.

If the File Directory Path value in the editor profile is blank, then you will need to put the full path value in for the Media Folder, eg: images/pdf

The Media Folder value can also accept variables like the File Directory Path.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

GFCOM
Hi Ryan,

Seems to not work as expected :
- On empty mediajce fields : the path is not taken in account (I can see every folders)
- On already filled mediajce fields (edit an article for eg.) the modal show an empty folder.

Here is my configuration :
- Editor Profile "File Directory Path" is blank (so images is used)
- Custom "mediajce" field "Media Path" set to "images/podcast"
- Having a podcast folder in default "images" Joomla folder (JROOT/images/podcast)

Regards,
Teddy

Ryan
- Editor Profile "File Directory Path" is blank (so images is used)


Is this the value in Editor Profiles -> Editor Parameters -> Filesystem?

Have you set a "File Directory Path" value in Editor Profiles -> Plugin Parameters -> File Browser?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

GFCOM
[quotePost id="113014"]Is this the value in Editor Profiles -> Editor Parameters -> Filesystem?[/quotePost]
Yes, this input is empty

[quotePost id="113014"]Have you set a "File Directory Path" value in Editor Profiles -> Plugin Parameters -> File Browser?[/quotePost]
No, nothing here, this input is also empty

I can provide you admin/FTP access if needed, I may have missed something.

Regards,
Teddy

Ryan
Please send me a login -> https://www.joomlacontenteditor.net/contact/site-login

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

ligi
We seem to have exactly the same problem...would be so great to be able to use 'custom directory paths' for different kind of files...but whatever we try, it does not seem to listen to whatever we try....what to do...???

GFCOM
You need to put the folder without the "images" folder of Joomla!

If you want to upload files to /images/directory/sub-directory, you need to put directory/sub-directory/ in the Media Path value.

However, I found out that this folder is not taken in account when you upload via the "direct upload" button.

Regards,
Teddy

Ryan
As @GFCOM and the field description says:

"Path where media files are located, relative to the File Directory Path set in the Editor Profile parameters."

This is for security, so that the user can only access the folder path they have been assigned to in the Editor Profile. If the File Directotory Path is empty, then the default for the File Directotory Path is "images" and therefore this media paths is relative to "images".

However, I found out that this folder is not taken in account when you upload via the "direct upload" button.


I'll look into this.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.