Files
i2p.itoopie/apps/syndie/jsp/viewtempattachment.jsp
jrandom 1a6b49cfb8 2005-08-23 jrandom
* Removed the concept of "no bandwidth limit" - if none is specified, its
      16KBps in/out.
    * Include ack packets in the per-peer cwin throttle (they were part of the
      bandwidth limit though).
    * Tweak the SSU cwin operation to get more accurrate estimates under
      congestions.
    * SSU improvements to resend more efficiently.
    * Added a basic scheduler to eepget to fetch multiple files sequentially.
2005-08-23 21:25:49 +00:00

15 lines
616 B
Plaintext

<%@page import="net.i2p.syndie.web.ArchiveViewerBean" %><jsp:useBean
scope="session" class="net.i2p.syndie.web.PostBean" id="post" /><%
String id = request.getParameter(ArchiveViewerBean.PARAM_ATTACHMENT);
if (id != null) {
try {
int attachmentId = Integer.parseInt(id);
if ( (attachmentId < 0) || (attachmentId >= post.getAttachmentCount()) ) {
%>Attachment <%=attachmentId%> does not exist<%
} else {
response.setContentType(post.getContentType(attachmentId));
post.writeAttachmentData(attachmentId, response.getOutputStream());
}
} catch (NumberFormatException nfe) {}
}
%>