[
https://issues.apache.org/jira/browse/TIKA-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18034459#comment-18034459
]
ASF GitHub Bot commented on TIKA-4538:
--------------------------------------
mdutton3 commented on PR #2383:
URL: https://github.com/apache/tika/pull/2383#issuecomment-3474166082
Updated with ASF Jira TIKA issue and rebased to latest `main` commit.
> AZBlobFetcher always throws FileAlreadyExistsException
> ------------------------------------------------------
>
> Key: TIKA-4538
> URL: https://issues.apache.org/jira/browse/TIKA-4538
> Project: Tika
> Issue Type: Bug
> Components: tika-pipes
> Affects Versions: 3.2.3
> Reporter: Matt Dutton
> Priority: Minor
>
> When hosting Tika on Windows, calling the /tika/* endpoints with
> {{enableUnsecureFeatures=true}} and using AZBlobFetcher, the
> {{AZBlobFetcher}} throws a {{FileAlreadyExistsException}} exception.
> The {{AZBlobFetcher}} uses {{TemporaryResources.createTempFile()}} which uses
> {{java.nio.file.Files.createTempFile}} to create the temp file. This function
> does not just generate a new, unique name but also creates the actual file.
> REF: [JavaDoc -
> java.nio.file.Files.createTempFile(...)|https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#createTempFile-java.nio.file.Path-java.lang.String-java.lang.String-java.nio.file.attribute.FileAttribute...-]
> When {{AZBlobFetcher}} calls {{{}BlobClient.downloadToFile(string){}}}, it
> throws an exception for the existing file.
> REF: [JavaDoc -
> com.azure.storage.blob.specialized.BlobClientBase.downloadToFile(...)|https://javadoc.io/static/com.azure/azure-storage-blob/12.10.1/com/azure/storage/blob/specialized/BlobClientBase.html#downloadToFile-java.lang.String-]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)