Search code examples
uploadconvertigo

Convertigo Http Connector multipart/form-data


How Configurations for Http Connector - Http Transaction for multipart/form-data? this is my screen shoot setting,

screen shoot

with this setting, the request was send but the file disappeared from request. anyone can help me?


Solution

  • multi-part form encoded is supported out of the box by Convertigo, except it is supported on the HTML connector and not the HTTP connector so to upload a file :

    Create a HTML connector. The hostname, port and isHttps properties are not mandatory to be modified here

    Create a HTML transaction, name it "DoUpload"

    On this Transaction create a "TransactionStarted" handler (RightClick->new>Handler->Start of Transaction

    In this handler create a HTTP-Upload statement (RightClick->new->statement->HTTP_upload_request)

    Configure statement properties : - FilePath to the file to upload (JS property) - filename to the name of the uploaded file (JSproperty) - host, port, isHttps to the correct setting for HTTP or https - URI to the uri path (JS property)

    Be sure to set the transaction's "Maintain Connector State" property to "true"

    See : http://help.convertigo.com/7.2.1/topic/com.twinsoft.convertigo.studio.help/help/helpRefManual/HTTPuploadrequest.html

    This should do the trick.