Skip to content

Commit 42c86b2

Browse files
committed
use opened storageIO
1 parent fdb7629 commit 42c86b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/edu/harvard/iq/dataverse/util/FileUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ public static String determineRemoteFileType(DataFile df, String fileName) {
442442
try {
443443
StorageIO<DataFile> storage = df.getStorageIO();
444444
storage.open(DataAccessOption.READ_ACCESS);
445-
try (InputStream is = df.getStorageIO().getInputStream()) {
445+
try (InputStream is = storage.getInputStream()) {
446446

447447
// Read the first 42 bytes of the file to determine the file type
448448
byte[] buffer = new byte[42];

0 commit comments

Comments
 (0)