You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2019/10/02 10:15:44 UTC

[GitHub] [royale-asjs] Harbs commented on issue #488: How to retrieve image after browsing

Harbs commented on issue #488: How to retrieve image after browsing   
URL: https://github.com/apache/royale-asjs/issues/488#issuecomment-537429485
 
 
   Below is what we're using to upload a file after it's selected using FileProxy and FileBrowser.
   FileUploader is a custom class which uses URLBinaryLoader to do a multipart upload.
   
   ````
   private function sendRasterImage(fileRef:FileProxy):void{
   	stopUpload();
   	var params:Object = {
   		"f"  : fileRef.name,
   		"id" : "foobaz"
   	};
   
   	uploader = new FileUploader(params);
   	uploader.onComplete = handleRasterResponse;
   	uploader.onError = handleUploadError;
   	uploader.onProgress = handleUploadProgress;
   	uploader.bytesToUpload = (loadingFile.model as IFileModel).blob as BinaryData;
   	
   	CursorManager.setBusyCursor();
   	uploadStartTime = new Date().getTime();
   	uploader.upload(APIConstants.PUT_IMAGE_URL);
   	
   }
   ````

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services