Jeremy,

Re:
> Instead of a text variable, you can also use a blob variable to avoid the 
> size limitation.
> 
> http://doc.4d.com/4Dv16R5/4D/16-R5/WEB-GET-HTTP-BODY.301-3481155.en.html 
> <http://doc.4d.com/4Dv16R5/4D/16-R5/WEB-GET-HTTP-BODY.301-3481155.en.html>

Yes in fact I am declaring the body variable as a BLOb and passing a BLOb from 
the client.

Roughly speaking here is what I am doing on the client:

C_LONGINT($vl_MyID)
C_PICTURE($vg_Image)
C_BLOB($vx_ImageBlob;$vx_Request)
C_TEXT($vt_ImageB64Text;$vt_Request;$vx_Response)
C_OBJECT($vo_Object)
$vl_MyID:=1
PICTURE TO BLOB($vg_Image;$vx_ImageBlob)
BASE64 ENCODE($vx_ImageBlob;$vt_ImageB64Text)

$vo_Object:=New object
$vo_Object.id <http://vo_object.id/>:=$vl_MyID
$vo_Object.image:=$vt_ImageB64Text

$vt_Request:=JSON Stringify($vo_Object)
TEXT TO BLOB($vt_Request;$vx_Request)

HTTP AUTEHNTICATE(“TEST”;”TESTPASS”)
$vl_Status:=HTTP Request(HTTP Post Method;”MYURL”;$vx_Request;$vx_Response)  
//Also tried adding various headers
$vt_Response:=BLOB to text($vx_Response;UTF8 text without length)
$vo_Response:=JSON parse($vt_Response;Is object)

I have built dozens of POST methods like this and all have worked till I try to 
put a relatively small BASE64 encoded image into the JSON and the subsequent 
BLOb.  I have also built several rest calls that send out images following a 
GET Request.  The POST just seems to cause the Web Server some major problems.  
It seems to hang the On web authentication part...

I am looking for a way to send the images that works.

Regards,  Dougie
________________________________________________________

telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com <mailto:jdcr...@telekinetix.com>  Web : 
http://www.telekinetix.com <http://www.telekinetix.com/>
________________________________________________________
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to