Commit Graph

6 Commits

Author SHA1 Message Date
Bharat Mediratta
ef8751468b Base64 encode the data result if the encoding param is set to "base64".
Fixes #1400.
2010-09-25 13:27:35 -07:00
Bharat Mediratta
6563ad1393 Return the right content type for album thumbnails (based on the album cover's mime type) 2010-08-14 22:00:53 -07:00
Bharat Mediratta
3c18762fda Change the way that this works. Now instead of sending back the image
metadata and the data itself JSON encoded, we just send back the raw
data with the right Content-Type.  This, combined with code in
Item_Model::as_restful_array() that swaps in /rest/data urls as
appropriate, means that the RESTful payload has consistent urls when
permissions are in play.
2010-08-09 22:54:57 -07:00
Bharat Mediratta
b7700d1eec Require the size parameter. Optional params are confusing. And be
robust in the face of a missing data file (movies and albums lack
resize, albums lack full size, some albums don't have a thumb if they
have no contents, etc)
2010-08-08 09:57:13 -07:00
Bharat Mediratta
4e95ec843a Allow item_rest::put() to replace the current data file. Remove
data_rest::put() altogether; it's no longer necessary.
2010-08-08 01:12:43 -07:00
Bharat Mediratta
20fd987296 A new REST resource that allows access to view and modify the actual
contents of the file, which enables REST viewers to see the actual
data which is useful when the files are privileged.  Currently it
returns the contents of the file in JSON encoded form, which may not
be the best.  Multipart/mime might be much better.

Fixes ticket #1224.
2010-08-07 22:33:01 -07:00