Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

Commit a4c8897

Browse files
author
sowerstl
committed
Include .tgz in Container upload also, since the API allows .tar.gz (DOECODE-666;p2)
1 parent 1e95d96 commit a4c8897

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/gov/osti/services/Metadata.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -959,10 +959,10 @@ private static void validateUploads(FormDataContentDisposition fileInfo, FormDat
959959
// evaluate container upload
960960
if (containerInfo != null && !StringUtils.isBlank(containerInfo.getFileName())) {
961961
String fileName = containerInfo.getFileName();
962-
Pattern containerPattern = Pattern.compile("[.](?:simg|tar(?:[.]gz)?)$");
962+
Pattern containerPattern = Pattern.compile("[.](?:simg|tgz|tar(?:[.]gz)?)$");
963963
Matcher m = containerPattern.matcher(fileName);
964964
if (!m.find())
965-
throw new ValidationException("Container image upload failed! File must be of type: .tar, .tar.gz, .simg");
965+
throw new ValidationException("Container image upload failed! File must be of type: .tar, .tgz, .tar.gz, .simg");
966966
}
967967
}
968968

0 commit comments

Comments
 (0)