{"action":"created","issue":{"url":"https://api.github.com/repos/frostealth/yii2-aws-s3/issues/3","labels_url":"https://api.github.com/repos/frostealth/yii2-aws-s3/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/frostealth/yii2-aws-s3/issues/3/comments","events_url":"https://api.github.com/repos/frostealth/yii2-aws-s3/issues/3/events","html_url":"https://github.com/frostealth/yii2-aws-s3/issues/3","id":119897484,"number":3,"title":"uploadAsync not working","user":{"login":"CCSS-Github","id":14329313,"avatar_url":"https://avatars.githubusercontent.com/u/14329313?v=3","gravatar_id":"","url":"https://api.github.com/users/CCSS-Github","html_url":"https://github.com/CCSS-Github","followers_url":"https://api.github.com/users/CCSS-Github/followers","following_url":"https://api.github.com/users/CCSS-Github/following{/other_user}","gists_url":"https://api.github.com/users/CCSS-Github/gists{/gist_id}","starred_url":"https://api.github.com/users/CCSS-Github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CCSS-Github/subscriptions","organizations_url":"https://api.github.com/users/CCSS-Github/orgs","repos_url":"https://api.github.com/users/CCSS-Github/repos","events_url":"https://api.github.com/users/CCSS-Github/events{/privacy}","received_events_url":"https://api.github.com/users/CCSS-Github/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-02T09:10:20Z","updated_at":"2015-12-02T09:11:03Z","closed_at":null,"body":"Earlier we are using mulitpart form upload which is going to be deprecate. So we switch to UploadAsync method to upload image to S3 but its creating empty file with no content - image file only have source file path in it. Kindly guide"},"comment":{"url":"https://api.github.com/repos/frostealth/yii2-aws-s3/issues/comments/161228744","html_url":"https://github.com/frostealth/yii2-aws-s3/issues/3#issuecomment-161228744","issue_url":"https://api.github.com/repos/frostealth/yii2-aws-s3/issues/3","id":161228744,"user":{"login":"CCSS-Github","id":14329313,"avatar_url":"https://avatars.githubusercontent.com/u/14329313?v=3","gravatar_id":"","url":"https://api.github.com/users/CCSS-Github","html_url":"https://github.com/CCSS-Github","followers_url":"https://api.github.com/users/CCSS-Github/followers","following_url":"https://api.github.com/users/CCSS-Github/following{/other_user}","gists_url":"https://api.github.com/users/CCSS-Github/gists{/gist_id}","starred_url":"https://api.github.com/users/CCSS-Github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CCSS-Github/subscriptions","organizations_url":"https://api.github.com/users/CCSS-Github/orgs","repos_url":"https://api.github.com/users/CCSS-Github/repos","events_url":"https://api.github.com/users/CCSS-Github/events{/privacy}","received_events_url":"https://api.github.com/users/CCSS-Github/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T09:11:03Z","updated_at":"2015-12-02T09:11:03Z","body":"Sample code:\r\n\r\n\t\t\t\t// checking valid local path\r\n\t\t\t\tif (!file_exists($local_file_url)) array(\"error\"=>\"invlid_path\");\r\n\t\t\r\n\t\t\t\t// TODO: Bucket configuration as per environment\r\n\t\t\t\t$bucket = '';\r\n\t\t\r\n\t\t\t\t// image upload settings\r\n\t\t\t\t$concurrency = 5;\r\n\t\t\t\t$minPartSize = 1073741824; // 1024 MB\r\n\t\t\t\t\r\n\t\t\t\t// image upload aws\r\n\t\t\t\t// Yii::$app->get(S3_BUCKET)->multipartUpload(\r\n\t\t\t\t\t// \"$desired_aws_url\",\r\n\t\t\t\t\t// \"$local_file_url\",\r\n\t\t\t\t\t// $concurrency,\r\n\t\t\t\t\t// $minPartSize\r\n\t\t\t\t// );\r\n\t\t\t\r\n\r\n\t\t\t\t$promise = Yii::$app->get(S3_BUCKET)->uploadAsync(\r\n\t\t\t\t\t\"$desired_aws_url\",\r\n\t\t\t\t\t\"$local_file_url\",\r\n\t\t\t\t\t$concurrency,\r\n\t\t\t\t\t$minPartSize\r\n\t\t\t\t);\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// block until the result is ready\r\n\t\t\t\t$promise->wait();\r\n\t\t\t\tprint_r($promise); exit;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// Getting image absolute path from aws\t\r\n\t\t\t$aws_url = Yii::$app->get(S3_BUCKET)->getUrl(\"$desired_aws_url\");\r\n\r\n\t\t\treturn $aws_url;"}}