Closed hoangdangduy closed 5 years ago
You will need to explicitly call close()
on the RandomAccessFile
that you have created for the upload request. The best place to do this would be the UploadMediaItemResponse
has been returned. This library does not handle the opening or closing of files, that's up to the developer to handle correctly.
(For example, you may wish to retry the call with the same file, without closing it first.)
It looks like the code sample in the documentation isn't quite showing this - I have filed a bug internally to improve this.
I create application run 24/24. Then file was uploaded success, I want to delete file but it still was holded by process upload lead to an exception was throw. So, how the way to delete file when upload success and java application still run ?
My code upload is below.