Posts: 3
Threads: 2
Joined: Oct 2019
Reputation:
0
Location: Portugal
I'm on IW15.1.10 and I'm using a TIWFileUploader to upload a file.
Everything is ok but when I try to access the original file, the one to be uploaded, by another external app, it woin't be possible because the file is locked, is in use. So it seems that IWFileUploader is locking the file.
Is something that I'm missing? How can I workaround this?
Thanks
Posts: 1,136
Threads: 37
Joined: Mar 2018
Reputation:
30
Location: Limassol, Cyprus
The file uploader doesnt "save" the file except in a temp area. Your code is the one that saves/copies it to where you want. Its is either your code forgetting to free a stream/close a file, or possibly your antivirus scanning the file as it sees it is new.
Posts: 169
Threads: 47
Joined: Jan 2020
Reputation:
4
Location: Portugal
Yes, I know that. I’m doing the exactly the you mentioned on your demo of the IWFileUploader.
Maybe your second thought, the antivirus.
I’d saving to a memory stream and the same happens. Could it be antivirus also?
Posts: 1,136
Threads: 37
Joined: Mar 2018
Reputation:
30
Location: Limassol, Cyprus
Since TIWFileUploader only keeps the internal temp file, it can't be it.
Try just as a test temporarily disabling your AV. If that fixes it, then there are a variety of solutions but the first step is to find what has it locked. You can also use a tool like filemon.