groupdocs-total / GroupDocs.Total-for-Java-Spring

Moved to https://github.com/groupdocs-total/GroupDocs.Total-for-Java/tree/main/Demos/Spring
https://products.groupdocs.com/total/java
MIT License
0 stars 1 forks source link

Cleanup of convertedDocument(s) after conversion successful #75

Closed hajohn13 closed 4 years ago

hajohn13 commented 4 years ago

After performing a convertedDocument.save() and a convertedDocument.dispose(), I am unable to clean up the temp file. Using the below code:

if (tmpFile != null) { Files.deleteIfExists(Paths.get(destinationFile)); }

I received an error saying "The process cannot access the file because it is being used by another process."

Is there a better way to perform this cleanup?

John

egorovpavel commented 4 years ago

Hi @hajohn13, could you share the full source code of action you trying to perform.

hajohn13 commented 4 years ago

That'll be difficult as I have made mods to the "GroupDocs.Total for Java Spring" (before Groupdocs converted the conversion module to Angular) to be integrated with our product. I can send the ConversionServiceImpl.java, but it won't be plug and play.

I guess my issue/bug is more related to the input streams and if they are being closed properly after the file has been "converted" to a PDF. I am able to transfer the converted file and see that it is converted as it should be, but simply can't clean it up once the conversion is done.

John

On Tue, Oct 22, 2019 at 4:46 AM Pavel Egorov notifications@github.com wrote:

Hi @hajohn13 https://github.com/hajohn13, could you share the full source code of action you trying to perform.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/groupdocs-total/GroupDocs.Total-for-Java-Spring/issues/75?email_source=notifications&email_token=AMG7LBPZYVJN53BYSEEPHNLQP24YFA5CNFSM4JC5XSGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB47OTA#issuecomment-544864076, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMG7LBPD4Y33QM5PCEXV2D3QP24YFANCNFSM4JC5XSGA .

koleslena commented 4 years ago

Hi @hajohn13 , I can't understand what modifications you made, so could you provide your ConversionServiceImpl.java?

hajohn13 commented 4 years ago

Closing issue