UHTTP->DUMP_FILE_CONTENTS:File not created

Author: i2stiller@gmx.de (istiller)

Hi freaks Just doing a few file transfer by UHTTP, which looks pretty good. BUT ... But then sometimes, UHTTP->DUMP_FILE_CONTENTS does not create a file on disk, even if GET_INFO("length) returns the correct length. A retry with exactly same paramters dumps the file Any idea? Ingo   Here a few lines of debug messages:

-------------------Try 1 -------------------------- DUMP_FILE_CONTENTS('C:\Users\user\AppData\Local\Temp\~FILE1.pdf', 'TCPRCVBUF=1m') >SEND('http://address','GET','access_token=xyz') &lt; <SEND('http://address','GET','Cache-Control=no-cache, no-storeTransfer-Encoding=chunkedContent-Type=application/pdfServer=Microsoft-HTTPAPI/2.0Access-Control-Allow-Origin=*Access-Control-Request-Methods=GET, POST, PUT, DELETE, OPTIONSAccess-Control-Allow-Headers=Content-Type, Accept, Authorization, Access_Token, responseTypeAccess-Control-Expose-Headers=Content-Type, Content-LengthDate=Tue, 29 Aug 2017 07:13:40 GMT') STS_SND=200 GET_INFO('LENGTH', '') DUMP_FILE_CONTENTS('', '') Dumped 169848 bytes to 'C:\Users\user\AppData\Local\Temp\~FILE1.pdf' 2305 - Cannot get the properties of 'C:\Users\user\AppData\Local\Temp\~FILE1.pdf': Das System kann die angegebene Datei nicht finden.. ERROR=-13MNEM=<UIOSERR_OS_COMMAND>DESCRIPTION=Directory and/or file operation failed -------------------Try 2 -------------------------- DUMP_FILE_CONTENTS('C:\Users\user\AppData\Local\Temp\~FILE1.pdf', 'TCPRCVBUF=1m') >SEND('http://address','GET','access_token=xyz') <SEND('http://address','GET','Cache-Control=no-cache, no-storeTransfer-Encoding=chunkedContent-Type=application/pdfServer=Microsoft-HTTPAPI/2.0Access-Control-Allow-Origin=*Access-Control-Request-Methods=GET, POST, PUT, DELETE, OPTIONSAccess-Control-Allow-Headers=Content-Type, Accept, Authorization, Access_Token, responseTypeAccess-Control-Expose-Headers=Content-Type, Content-LengthDate=Tue, 29 Aug 2017 07:13:41 GMT') STS_SND=200 GET_INFO('LENGTH', '') DUMP_FILE_CONTENTS('', '') Dumped 169848 bytes to 'C:\Users\user\AppData\Local\Temp\~FILE1.pdf'  FILETYPE=FILEFILESIZE=169848 FULLPATH=C:\Users\user\AppData\Local\Temp\~FILE1.pdf...

1 Comment

  1. Hi Ingo, I had a quick look, but (as far as I can see) this has not been reported before. In case the operation DUMP_FILE_CONTENTS returns a positive value (and it's equal to the value returned by GET_INFO(“length)) then it apparently was successful and the specified file should have been created. Have you already tried to add a delay after executing DUMP_FILE_CONTENTS and before you check if the file exists? Maybe this is some sort of caching problem? I’ve heard from a colleague that it’s (e.g.) possible that Windows might write files with a delay (because of disk write caching). Here’s some info I’ve found on this topic: > HOW TO: Manually Turn Disk Write Caching On or Off Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)