Skip to content
Snippets Groups Projects

F filesystem response url

Merged Timm Fitschen requested to merge f-filesystem-response-url into dev
Files
4
@@ -86,14 +86,16 @@ public class FileSystemResource extends AbstractCaosDBServerResource {
}
if (file.isDirectory()) {
String referenceString = getReference().toString();
if (!referenceString.endsWith("/")) {
referenceString = referenceString + "/";
}
String path = (specifier.endsWith("/") ? specifier : specifier + "/");
String url =
getUtils().getServerRootURI()
+ "/FileSystem"
+ (path.startsWith("/") ? path : ("/" + path));
final Element folder = new Element("dir");
folder.setAttribute("path", (specifier.endsWith("/") ? specifier : specifier + "/"));
folder.setAttribute("path", path);
folder.setAttribute("name", file.getName());
folder.setAttribute("url", referenceString);
folder.setAttribute("url", url);
final boolean thumbnailsExist =
new File(file.getAbsolutePath() + File.separator + ".thumbnails").exists();
@@ -110,7 +112,7 @@ public class FileSystemResource extends AbstractCaosDBServerResource {
}
if (thumbnailsExist) {
final Attribute thumbnailAttribute = getThumbnailAttribute(file, child, referenceString);
final Attribute thumbnailAttribute = getThumbnailAttribute(file, child, url);
if (thumbnailAttribute != null) {
celem.setAttribute(thumbnailAttribute);
}
Loading