Skip Navigation

[Résolu] Feature request: store post ID of uploaded file in File fields

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created Il y a 10 années et 2 mois. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

This topic contains 2 réponses, has 2 voix.

Last updated by iann Il y a 10 années et 2 mois.

Assigned support staff: Bigul.


In the use of a File upload field, Types uploads the file to the Media library as a post attachment.

However Types only stores the direct link to the attachment in the database as the field meta.
Even though the attached file is technically a "post" in the WP database, Types does NOT store the post ID of the attached file in the meta, so there is no way of retrieving the fie's title, caption (excerpt) etc - only the direct permalink.

This becomes a problem if you want to display the files within post content for download by front-end users.
You cannot display the uploaded file's TITLE as the text within the link <a> tags, for a nicer looking link.
You can only display the permalink address as the link itself, and you may not want the site's folder structure displayed like that!

Saving the Post ID of the uploaded file, along with the permalink, would solve the problem.



Dear iann,

Thank you for the suggestion. We will surely consider this.

With Regards



thanks Bigul.

In case it may help someone else,
to achieve this result I have found i can use rilwis' meta box, another plugin.
It saves more associated metadata with its advanced file upload box.

Le forum ‘Types Community Support’ est fermé à de nouveaux sujets et réponses.