I have successfully uploaded the object to the google cloud storage using the Java library code as below
public static void uploadObject(
String projectId, String bucketName, String objectName, String filePath) throws IOException {
Storage storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService();
BlobId blobId = BlobId.of(bucketName, objectName);
BlobInfo blobInfo = BlobInfo.newBuilder(blobId).build();
storage.create(blobInfo, Files.readAllBytes(Paths.get(filePath)));
System.out.println(
"File " + filePath + " uploaded to bucket " + bucketName + " as " + objectName);
}
If I browse the public URL
If I browse the URL https://storage.googleapis.com/fetebird-product/bird.jpg the file is the downloadable link. How can I make it just a simple browsing file
What I am missing?