<div dir="ltr">Is it possible for a recipe to call the function LinkUpload directly?</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>____<br><a href="http://kiwiwiki.nz" target="_blank"><font size="1">http://kiwiwiki.nz</font></a></div></div></div></div>
<br><div class="gmail_quote">On 3 April 2017 at 06:10, Petko Yotov <span dir="ltr"><<a href="mailto:5ko@free.fr" target="_blank">5ko@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 31/03/2017 17:29, <a href="mailto:ccox@endlessnow.com" target="_blank">ccox@endlessnow.com</a> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I wanting to do something in a recipe in php that takes in an argument<br>
of Attachment or Group/Attachment or Group/Page/Attachment<br>
<br>
In particular needs to support the latter (down to uploads per<br>
page).  I just want to make sure I code it "right".<br>
</blockquote>
<br></span>
There are cookbook recipes but wouldn't you rather study from the original?<br>
<br>
The scripts/upload.php file has the function LinkUpload().<br>
<br>
Its $path argument contains File.ext or Group/File.ext or Group/Page/File.ext or even Group.Page/File.ext.<br>
<br>
Look how $pagename is derived from that, and $filepath becomes the actual path to the disk file if you need to manipulate it. At the end, $path becomes the URL to the file that will be sent to the browser.<span class="HOEnZb"><font color="#888888"><br>
<br>
Petko</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
______________________________<wbr>_________________<br>
pmwiki-users mailing list<br>
<a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@pmichaud.com</a><br>
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" rel="noreferrer" target="_blank">http://www.pmichaud.com/mailma<wbr>n/listinfo/pmwiki-users</a><br>
</div></div></blockquote></div><br></div>