Author: michiel
Date: 2009-11-23 15:55:24 +0100 (Mon, 23 Nov 2009)
New Revision: 39851
Modified:
mmbase/trunk/applications/resources/src/main/java/org/mmbase/module/builders/Images.java
Log:
avoid odd names
Modified:
mmbase/trunk/applications/resources/src/main/java/org/mmbase/module/builders/Images.java
===================================================================
---
mmbase/trunk/applications/resources/src/main/java/org/mmbase/module/builders/Images.java
2009-11-23 14:54:49 UTC (rev 39850)
+++
mmbase/trunk/applications/resources/src/main/java/org/mmbase/module/builders/Images.java
2009-11-23 14:55:24 UTC (rev 39851)
@@ -306,13 +306,13 @@
} else {
String number = node.getStringValue("_number");
SerializableInputStream is =
Casting.toSerializableInputStream(node.getInputStreamValue("handle"));
- if (is.getName() != null) {
+ if (is.getFileName() != null) {
File thumb = createTemporaryFile(is,
ImageCaches.GUI_IMAGETEMPLATE);
log.debug("Found for " + node.getNumber() + "(" + number + "):
" + thumb);
String files = FileServlet.getBasePath("files").substring(1);
String root = MMBaseContext.getHtmlRootUrlPath();
String thumbUrl = root + files + "temporary_images/" +
URLESCAPER.transform(thumb.getName());
- String origUrl = root + files + "uploads/" +
URLESCAPER.transform(is.getName()); // hmm, is this 'uploads' certain?
+ String origUrl = root + files + "uploads/" +
URLESCAPER.transform(is.getFileName()); // hmm, is this 'uploads' certain?
return "<a class='mm_gui' href='" + origUrl + "'><img src='" +
thumbUrl +"' /></a>";
} else {
return "<span class='mm_gui'>--</span>";
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs