Hey Adrian,
You were right:
user> (with-s3 (map #(.getName %) (.getMethods (class (blob-metadata
"my-container" "my-file.csv")))))
("getContentType" "setContentType" "getContentMD5" "setContentMD5"
"getType" "getSize" "setSize" "setLastModified" "getLastModified"
"getETag" "setETag" "hashCode" "equals" "compareTo" "compareTo"
"toString" "getName" "getLocation" "setName" "getType" "setType"
"getProviderId" "getUri" "getUserMetadata" "setId" "setLocation"
"setUri" "setUserMetadata" "wait" "wait" "wait" "getClass" "notify"
"notifyAll")
user> (with-s3 (.getSize (blob-metadata "my-container.csv" "my-
file.csv")))
585569425
Sorry, I was under the impression that blob-metadata's purpose was
retrieval of user-defined metadata.
Thanks for your help!
John David
On Aug 24, 6:05 pm, Adrian Cole <
adrian.f.c...@gmail.com> wrote:
> Hi, John David.
>
> You can portably get this through the BlobStore interface.
>
> In java, it is
> BlobMetadata blobMetadata(String container, String name);
>
> in clojure, it is:
> blob-metadata
>
> I hope this helps!
> -Adrian
>
> On Tue, Aug 24, 2010 at 4:43 PM, John David Eriksen <
jknd...@gmail.com>wrote:> Hi, we are trying to implement a progress bar. In order for this
> > progress bar to work, we need to obtain the size of a file stored in
> > S3. We have no way to precalculate this value.
>
> > The S3 API exposes a HEAD operation on objects that can retrieve the
> > object's size:
> >
http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectHEAD....
>
> > I suspect that Ruby AWS::S3 uses this technique:
> >
http://amazon.rubyforge.org/doc/classes/AWS/S3/S3Object.html#M000055
>
> > I looked through blobstore.clj but did not find a way to obtain an
> > object's size without downloading it first.
>
> > I've also looked through S3Object documentation and did not notice any
> > mentions of this functionality:
> >
http://code.google.com/p/jclouds/wiki/S3Object
>
> > Is there some way, via blobstore.clj or other jclouds functionality,
> > to obtain this information?
>
> > Thanks!
>
> > John David
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "jclouds-dev" group.
> > To post to this group, send email to
jclou...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
jclouds-dev...@googlegroups.com<
jclouds-dev%2Bunsu...@googlegroups.com>
> > .