Closed nilskoll closed 2 months ago
you have to declare $Document_blob
as Blob
. otherwise, .getContent()
returns 4D.Blob
which is a class of Object
, not a Blob
.
The first line is C_BLOB($Document_blob) ? I thought that might be the issue and tested with DOCUMENT TO BLOB, same issue
I need to trace the code to know more.
meanwhile, can you switch to the generic cURL command?
there is no reason to use the FTP command for FTP.
I found the bug, it was a side-effect of supporting files larger than 2GO on Windows.
Excellent news, however, as far as I can see, the download has version 4.8.4 in both the Test -> Plugin folder and in the curl.dmg. I tested again just to see if it was just the version number not updated, but the issue persist.
I see I uploaded the wrong plugin to releases
also I must have accidentally reverted the code when switching platforms.
please can you try this release
https://github.com/miyako/4d-plugin-curl-v3/releases/tag/4.8.6
Yes! Thank you so much for your incredible and quick response. Your service to the 4D developer community is invaluable :)
Hi!
I can't get the syntax with blob as $2 to work. Using a path and READDATA works.. When the document is passed as a blob in $2, the an empty document is created on the sftp server. The (True) branch works, the false doesn't:
` C_BLOB($Document_blob)
If (True) $CurlOptions_object.UPLOAD:=1 $CurlOptions_object.READDATA:=$Document_file.platformPath SET BLOB SIZE($Document_blob; 0) $CurlStatus_object:=cURL_FTP_Send($CurlOptions_object; $Document_blob; $CallbackMethod_text) Else $Document_blob:=$Document_file.getContent() C_OBJECT($CurlStatus_object) $CurlStatus_object:=cURL_FTP_Send($CurlOptions_object; $Document_blob; $CallbackMethod_text) End if `
Version 4D 20.4 LTS build 20.101372 Plugin version 4.8.4 Any suggestions? Thanks in advance!