Skip to content

Commit

Permalink
User filesystemStore bean instead of resourceStore
Browse files Browse the repository at this point in the history
  • Loading branch information
wangf1122 committed Oct 31, 2024
1 parent eea7be8 commit ff1b54c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,7 @@ public ResourceHolder getResource(final ServiceContext context, final String met

@Override
public ResourceHolder getResourceInternal(String metadataUuid, MetadataResourceVisibility visibility, String resourceId, Boolean approved) throws Exception {
if (decoratedStore != null) {
final ResourceHolder resource = decoratedStore
.getResourceInternal(metadataUuid, visibility, resourceId, approved);
return resource;
}
return null;
throw new UnsupportedOperationException("ResourceLoggerStore does not support getResourceInternal.");
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/fao/geonet/util/XslUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -1246,7 +1246,7 @@ public static String buildDataUrl(String url, Integer size) {
Matcher m = Pattern.compile(settingManager.getNodeURL() + "api/records/(.*)/attachments/(.*)$").matcher(url);
BufferedImage image;
if (m.find()) {
Store store = ApplicationContextHolder.get().getBean("resourceStore", Store.class);
Store store = ApplicationContextHolder.get().getBean("filesystemStore", Store.class);
try (Store.ResourceHolder file = store.getResourceInternal(
m.group(1),
MetadataResourceVisibility.PUBLIC,
Expand Down

0 comments on commit ff1b54c

Please sign in to comment.