<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div>thanks</div><div><br></div><div>works perfectly :) :D :)</div><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><br><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">De :</span></b> Nick Ager &lt;nick.ager@gmail.com&gt;<br><b><span style="font-weight: bold;">À :</span></b> Seaside - general discussion &lt;seaside@lists.squeakfoundation.org&gt;<br><b><span style="font-weight: bold;">Envoyé le :</span></b> Lun 29 novembre 2010, 17h 33min 23s<br><b><span style="font-weight: bold;">Objet&nbsp;:</span></b> Re: Re : [Seaside] File to URL<br></font><br>Hi,<div><br></div><div>The render methods are meant to generate html.&nbsp;</div><div><div
 class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-size:12pt;">
<div><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="font-size:small;"><br></span></font></div><div><div>renderContentOn: html</div><div><span style="white-space:pre-wrap;">        </span>MyFileLibrary addAllFilesIn:
 './'.</div><div><span style="white-space:pre-wrap;">        </span>MyFileLibrary addFileAt: 'test.pdf'.</div><div><span style="white-space:pre-wrap;"></span></div></div></div></div></blockquote><div><br></div><div>
<div>These lines add the files all files in the local directory to the file library and specifically&nbsp;test.pdf *each* time the browser requests a page. Instead you only need to a file to the file library once. You can do this programmatically say via the workspace in the your image:</div>
</div><div><br></div><div>MyFileLibrary addFileAt: '&lt;path to file&gt;/test.pdf'.</div><div><br></div><div>or via the web ui, by browsing to /config then selecting files,&nbsp;MyFileLibrary</div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-size:12pt;"><div><div><span style="white-space:pre-wrap;">        </span></div><div><span style="white-space:pre-wrap;">        </span>html image url: (MyFileLibrary urlOf: #testPdf).</div>
</div></div></div></blockquote><div><br></div><div><br></div><div>You can then render a link to the file by:</div><div><br></div><div>renderContentOn: html</div><div>&nbsp;&nbsp; &nbsp;html anchor url: (MyFileLibrary /&nbsp;#testPdf); with: 'click here to download my pdf'</div>
<div><br></div><div><br></div><div>WAExternalFileLibrary is another option....</div><div><br></div><div>Nick</div></div></div>
</div></div><div style="position:fixed"></div>


</div><br>




      </body></html>