When you GET an attachment URL in the web service you're redirected to a URL on the librarian. The last path element of the librarian URL is the file's current filename.
I could create a launchpadlib method HostedFile.stat() which returns the filename and content type. This would involve two HTTP requests: a GET request on the web service to get the filename, and a HEAD request to the librarian to get the content type. We'd avoid a GET to the librarian and wouldn't download the file.
When you GET an attachment URL in the web service you're redirected to a URL on the librarian. The last path element of the librarian URL is the file's current filename.
I could create a launchpadlib method HostedFile.stat() which returns the filename and content type. This would involve two HTTP requests: a GET request on the web service to get the filename, and a HEAD request to the librarian to get the content type. We'd avoid a GET to the librarian and wouldn't download the file.
Is this an interesting idea?