[tahoe-dev] wanted in webapi: a way to download a file only if it is a file
zooko
zooko at zooko.com
Thu Aug 9 15:30:49 PDT 2007
Following-up to my own post:
On Aug 9, 2007, at 3:55 PM, zooko wrote:
> Suppose you are asked to download something, and if it is a file you
> are supposed to just download it, but if it is a directory you are
> supposed to recursively download its contents.
...
> This calls out for a flag, such as "GET URL?t=file", which would
> cause the server to return an error if the thing at URL is not a file.
Actually I guess it *is* possible to do the right thing without this
flag -- you just fetch the metadata of the *parent* directory of the
target then use the type and uri from that metadata.
Still, this is non-obvious and I think the webapi would be improved
by providing a way to express "Just get me the file." without saying
"Get me the file or else some human-readable web page if it turns out
it isn't a file.".
Regards,
Zooko
More information about the tahoe-dev
mailing list