SID-00473: How can I determine if a given attachment exists or not?
| Status: |
Answered |
TWiki version: |
4.0.3 |
Perl version: |
5.x |
| Category: |
CategoryAttachments |
Server OS: |
RedHat Linux |
Last update: |
16 years ago |
It is quite straight forward to see if a given topic exists.
%IF{"istopic 'topicname'" then="present" else "not present"}%
However if topicname is changed for topicname?filename=myfile then this doesn't work as it always returns true (yes the topic exists) altering topicname to be fullurltotopic?filename=myfile does not work either.
How can I programmatically detect whether an attachment exists or not.
BTW I'm not looking for a %SEARCH solution as I'm trying to create an in-line URL link to either link to the appropriate file or to enable a pop-up warning functionality.
--
JeremyWolstenCroft - 2009-08-11
Discussion and Answer
I think you may need a
%SEARCH% solution for this:
QuerySearch can get you the attachment information you need.
Then the
SpreadSheetPlugin can be used to evaluate the search result, and generate in-line URL or tag with the javascript pop-up. See, "Can I use CALC in a formatted search?" in the plugin's documentation.
--
SeanCMorgan - 2009-08-13
Seems to be answered.
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
PeterThoeny - 2009-10-02
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.