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
- Forum
- Suggestons/Feature Requests
- Path of media field (custom fields)
Support is currently Online
Official support hours:
Monday To Friday
From 09:00 To 17:00 Europe/London (BST)
From 09:00 To 17:00 Europe/London (BST)
Hi
I really like your custom field (media field) to extend the fields of the articles.
For a new project, we would like to allow images to be uploaded only to the folder that is named with the ID of the article (for example, images/news/1234 if the id of the article is 1234). However, in the current version of the plugin it is only possible to specify a path (images/news/), but not the ID.
Is there a possibility to extend the field with a parameter so that the above can be implemented? That would be a really useful feature.
Regards
Stef
I really like your custom field (media field) to extend the fields of the articles.
For a new project, we would like to allow images to be uploaded only to the folder that is named with the ID of the article (for example, images/news/1234 if the id of the article is 1234). However, in the current version of the plugin it is only possible to specify a path (images/news/), but not the ID.
Is there a possibility to extend the field with a parameter so that the above can be implemented? That would be a really useful feature.
Regards
Stef
The article id is only available once an article has been created (ie: saved). This means that if you attempted to upload an image using a path that contained the id, before the article was saved, then it would be uploaded to a different folder, eg: images/news/0 than the one intended for the article.
For this reason, dynamic variables like id are not available for the File Directory Path.
For this reason, dynamic variables like id are not available for the File Directory Path.
Just because you're not paranoid doesn't mean everybody isn't out to get you.
The article id is only available once an article has been created (ie: saved). This means that if you attempted to upload an image using a path that contained the id, before the article was saved, then it would be uploaded to a different folder, eg: images/news/0 than the one intended for the article.
For this reason, dynamic variables like id are not available for the File Directory Path.
For this reason, dynamic variables like id are not available for the File Directory Path.
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Thanks for the quick reply, Ryan.
I can understand your reasoning, somehow it seems to work though. Tassos has such a solution on offer (https://www.tassos.gr/joomla-extensions/advanced-custom-fields/docs/how-to-add-a-file-upload-field-in-joomla-forms#settings). I just tested it, it works as desired. Maybe the extension can serve as an inspiration, how this feature could be implemented in your custom field.
I can understand your reasoning, somehow it seems to work though. Tassos has such a solution on offer (https://www.tassos.gr/joomla-extensions/advanced-custom-fields/docs/how-to-add-a-file-upload-field-in-joomla-forms#settings). I just tested it, it works as desired. Maybe the extension can serve as an inspiration, how this feature could be implemented in your custom field.
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!