I'm trying to upload image file to Google Cloud Storage with pre-signed URL (Spring boot). The file got uploaded but the object metadata also written in the file. Because of that it is loading as corrupted data.
How to remove that Object metadata from the file while upload/download the file from Google Cloud Storage?
String preSignedURL = gcpStorageService.signUrl(BlobInfo.newBuilder(gcpProperties.getBucketName(), blobName).build(), 5, TimeUnit.MINUTES,
SignUrlOption.httpMethod(HttpMethod.PUT)).toString();
When I call the presignedURL, the file got uploaded. But the uploaded object contains metadata as well.
For Example: I uploaded text file with text "google cloud storage test". When I download it, it looks like
------WebKitFormBoundaryqCsAsznB1hGFXICd
Content-Disposition: form-data; name="Expires"
1564396735
------WebKitFormBoundaryqCsAsznB1hGFXICd
Content-Disposition: form-data; name="Signature"
------WebKitFormBoundaryqCsAsznB1hGFXICd
Content-Disposition: form-data; name="file"; filename="test.txt"
Content-Type: text/plain
google cloud storage test
------WebKitFormBoundaryqCsAsznB1hGFXICd--
Thanks in advance