Skip to content

Commit eeef89a

Browse files
author
FalkWolsky
committed
Fixing AssetService - after Falk broke it.
1 parent 3476223 commit eeef89a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/asset/service/AssetServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public Mono<Asset> upload(Part filePart, int maxFileSizeKB, boolean isThumbnail)
6161

6262
// The reason we restrict file types here is to avoid having to deal with dangerous image types such as SVG,
6363
// which can have arbitrary HTML/JS inside of them.
64-
64+
final MediaType contentType = filePart.headers().getContentType();
6565
if (contentType == null || !ALLOWED_CONTENT_TYPES.contains(contentType)) {
6666
return Mono.error(new BizException(BizError.INVALID_PARAMETER, "INCORRECT_IMAGE_TYPE"));
6767
}

0 commit comments

Comments
 (0)