Publish a JSON representation of a binary file containing metadata

Bug #406912 reported by Leonard Richardson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restful
Triaged
Low
Unassigned
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

A cry goes out for a binary file's metadata: URL of the file, size, media type, etc. Currently a GET to the binary file resource redirects to the actual file in the librarian. By examining the HTTP response (to the original request or the redirect request) you can get this metadata, but it would be useful to have a JSON representation of the binary file resource so that clients like launchpadlib can examine this data in the same way they examine other data.

(Alternatively, we could give lazr.restfulclient the ability to introspect on these HTTP responses.)

The JSON representation would only be sent if the client sends 'application/json' in their Accept header. Otherwise they get the redirect. This would cause a slight confusion when the underlying binary file is a JSON document.

Changed in ubuntu:
status: New → Invalid
Revision history for this message
Leonard Richardson (leonardr) wrote :

wgrant asks for this feature, and also asks that it include the MD5 sum and other cryptographic hashes of the file.

Changed in lazr.restful:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.