Skip Navigation

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 9 years, 2 months ago. 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 replies, has 2 voices.

Last updated by iann 9 years, 2 months ago.

Assigned support staff: Bigul.

Author
Posts
#110542

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.

#110592

Bigul
Supporter

Dear iann,

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

--
With Regards

Bigul

#110735

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.

The forum ‘Types Community Support’ is closed to new topics and replies.