Hi all,<br><br>I've started some detective work and I've found this:<br><br>urlForDocument: anObject mimeType: mimeType fileName: fileName<br> ^ (self registry urlForRequestHandler:<br> (WADocumentHandler<br>
document: anObject<br> mimeType: mimeType<br> fileName: fileName)) displayString<br><br>That seems to suggest that it is possible to download an Object when clicking on a link.<br><br>Then I found this about document:<br>
<br>Instance Variables:<br> document <ByteArray | GIFImage | Image | String | WACachedDocument | any class that understands #asMIMEDocumentType:> contents of the document<br> fileName <String> file containing the document to be sent as an attachment, nil if no such file<br>
mimeDocument <MIMEDocument> MIMEDocument object representing this document and mimeType, generates stream used to write document for the response. <br> mimeType <String> standard HTTP mime type<br>
<br>This seems to suggest that a MIMEDocument should be used. That has a subclass of MIMELocalFileDocument which can have a fileStream. Which I think it what I'm looking for if I want to serve a file directly.<br><br>
So is this the way I should do it?<br>1. create a file stream (to be honest, I don't know how to yet, but this seems fairly standard)<br>2. put it in aMIMELocalFileDocument contentStream: theFileStream<br>3.use that in the anchor<br>
document: aMIMELocalFileDocument<br> mimeType: aMIMELocalFileDocument asMIMEDocumentType<br> fileName: 'some filename here'<br> with: 'some filename here'<br><br>I would really like some feedback on this one, thanks!<br>
<br><br><div class="gmail_quote">2010/3/23 Van Upboy <span dir="ltr"><<a href="mailto:van.upboy@gmail.com">van.upboy@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br><br>I'm using fileUpload (seaside 2.8), which uses a WAFile to store the contents directly. However, this doesn't work for (very) large files, because pharo will run out of memory. Likewise, an anchor like this:<br>
html anchor<br> document: aWAFile contents<br> mimeType: aWAFile contentType<br> fileName: aWAFile fileName;<br> with: aWAFile fileName.<br>won't work, because I can't serve the content directly from memory.<br>
<br>I'm new to SmallTalk & Seaside, and I'm wondering how I should approach this problem?<br><br>With kind regards,<br><font color="#888888">Van.<br><div style="display: inline;"></div>
</font></blockquote></div><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup { position:absolute; z-index:9999; padding: 0px 0px; margin-left: 0px; margin-top: 0px; width: 240px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 13px;}</style>