I have a public bucket here: http://storage.googleapis.com/tripket1/
And all the files in this bucket have the ACL set to 'public-read'. Yet when I try to view any of the files, such as:
http://storage.googleapis.com/tripket1/2013-05-25%2019.17.32_150.jpg
it returns a 'NoSuchKey' error.
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
</Error>
What could be causing this problem? These files were uploaded using the GCS client library for Java. Here's a code snipped from the uploader:
GcsFilename thumbGcsFilename = new GcsFilename(bucketName, thumb_filename);
GcsFileOptions options = new GcsFileOptions.Builder().mimeType("image/" + photo_extension).acl("public-read").build();
GcsOutputChannel outputChannel = gcsService.createOrReplace(thumbGcsFilename, options);
outputChannel.write(ByteBuffer.wrap(newImageData));
outputChannel.close();
LOGGER.info("Wrote file");
String thumb_url_str = String.format("http://storage.googleapis.com/%s/%s", bucketName, thumb_filename);
return thumb_url_str;