获取错误: - 将裁剪后的图像上传到Google云端存储时,“HTTP包装器不支持可写连接”

I have checked for this error all over the google. But couldn't find any useful answer.

I am trying to upload image to bucket by cropping it for which I have followed following approach. you can check my code in this post (How to get the image from bucket to preview it to the user).

  1. I uploaded the image on bucket.
  2. Fetched the image from bucket.
  3. Cropped the image.
  4. And then upload the image again to bucket

.

Above 1 to 3 points are successfully done. But when I try to upload the cropped image then I get this error: "HTTP wrapper does not support writeable connections". I am not able to understand whats going on? why am I getting this error. Can you please help me to resolve this error.