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.

#110692 Creating a form via xml and using mediajce as type

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, 29 March 2022 09:51 BST

lacwebadmin
Hi Ryan,

So I created a plugin that would load my custom form fields when creating an article. One of the field that I created is using type="mediajce" and I added directory="path_to_folder_relative_to_media_path". There's no error and the file browser appeared as popup but the problem is it doesn't default me to the directory that I set in the field attribute.

Is there a way to do this?

Thanks,
Jackson

lacwebadmin
Also, I found out when creating a field using mediajce type, the allowable file types are limited to:

jpg,jpeg,png,apng,gif,webp,avif,svg

and I am trying to upload an audio file MP3. I checked all the plugins that pertains to media and audio file mp3 is allowed.

Is there a way to add more file types when using mediajce?

Thanks,

Jackson

Ryan
I added directory="path_to_folder_relative_to_media_path". There's no error and the file browser appeared as popup but the problem is it doesn't default me to the directory that I set in the field attribute.

The JCE Media Field does not support the directory attribute, as the directory path is set by the editor profile that the user has access to.

Is there a way to add more file types when using mediajce?

Use a mediatype="files" or mediatype="media" attribute in the fiel xml.

Ryan Demmer

Lead Developer / CEO / CTO

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