Atozed Forums
IWFileUploader locking file - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: IWFileUploader locking file (/thread-1476.html)



IWFileUploader locking file - Cusco69 - 01-07-2020

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


RE: IWFileUploader locking file - kudzu - 01-07-2020

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.


RE: IWFileUploader locking file - Comograma - 01-07-2020

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?


RE: IWFileUploader locking file - Comograma - 01-07-2020

(01-07-2020, 02:57 PM)kudzu Wrote: 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.
Well, that I know and I'm doing the file upload exactly how your demo explains. I even try saving to a stream and even so the file will be in use. Yes, I'm freeing the stream.

So, the is either on the TIWFileUploader itself or, as you stated, on the antivirus.


RE: IWFileUploader locking file - kudzu - 01-08-2020

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.