+ "/resource/" + file.getPath();
String viewURI = absUrl
+ "/resources/" + website.getHandle()
+ "/" + file.getPath();
FileTypeMap map = FileTypeMap.getDefaultFileTypeMap();
// TODO: figure out why PNG is missing from Java MIME types
if (map instanceof MimetypesFileTypeMap) {
try {
((MimetypesFileTypeMap)map).addMimeTypes("image/png png PNG");
} catch (Exception ignored) {}
}
String contentType = map.getContentType(file.getName());
Entry entry = new Entry();
entry.setId(editMediaURI);
entry.setTitle(file.getName());
entry.setUpdated(new Date(file.getLastModified()));