|user authToken zipImage entity answerJSON ephemericUrl| "Ephemeric cloud managed runtime: https://www.pharocloud.com/kb/tutorial/ephemeric_cloud_managed_runtime" "How to connect an ephmeric instance to a remote database through a secure channel" "Ephemeric cloud credentials (available at http://www.pharocloud.com)" user := ''. authToken := ''. ZnConstants maximumEntitySize: 50*1024*1024. "Create a zip archive from the image file" ZipArchive new addFile: Smalltalk imageFile basename; addFile: 'stunnel.conf'; addFile: 'psk.txt'; writeToFileNamed: Smalltalk imageFile basename,'.zip'. zipImage := (Smalltalk imageFile basename,'.zip') asFileReference. "Create HTTP multi-part post-query" entity := ZnMultiPartFormDataEntity new addPart: (ZnMimePart fieldName: 'imageZip' fileName: Smalltalk imageFile basename entity: (ZnStreamingEntity readBinaryFrom: zipImage binaryReadStream usingType: 'application/zip' asMIMEType andLength: zipImage size)); yourself. "Send the query, read output" answerJSON := (ZnClient new beOneShot; url: ('https://www.pharocloud.com/api/ephemerics/user/{1}?auth={2}' format: { user. authToken }) asUrl; entity: entity; timeout: 60*1000; post; response) contents. "Get and show the URL of your appliance" ephemericUrl := ('http://', (answerJSON subStrings: '"') first) asUrl. ephemericUrl inspect.