'How to get data from such blob:http:// url in golang?

I have an api written in go, which takes the input in form of blob file, actually a blob url from frontend , When the file gets uploaded to s3 it makes an empty image.

My Go S3 Code looks like

bucket := os.Getenv(infrastructure.FilesBucketName)
if err := s3.PutS3Object(
    bucket,
    "testimage_12344589.jpeg",
    []byte("blob:http://localhost:3001/65e1e5ae-419e-44db-b651-a37c388a0ccb"),
    aws.String("image/jpeg")); err != nil {
    return nil, err
}

What is the best way to fix this issue ? I have also tried approaches like converting url to string etc, but nothing worked.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source