/*
- * Sone - GetImagePage.java - Copyright © 2011 David Roden
+ * Sone - GetImagePage.java - Copyright © 2011–2013 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
this.webInterface = webInterface;
}
- /**
- * {@inheritDoc}
- */
@Override
public String getPath() {
return "getImage.html";
}
- /**
- * {@inheritDoc}
- */
@Override
public boolean isPrefixPage() {
return false;
}
- /**
- * {@inheritDoc}
- */
@Override
public Response handleRequest(FreenetRequest request, Response response) throws IOException {
String imageId = request.getHttpRequest().getParam("image");
return response.setStatusCode(200).setStatusText("OK").setContentType(contentType).addHeader("Content-Disposition", "attachment; filename=" + temporaryImage.getId() + "." + contentType.substring(contentType.lastIndexOf('/') + 1)).write(temporaryImage.getImageData());
}
- /**
- * {@inheritDoc}
- */
@Override
public boolean isLinkExcepted(URI link) {
return false;