summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/data_rest.php
AgeCommit message (Collapse)Author
2013-06-12#2074 - Mirror some additional file_proxy checks in data_rest.shadlaws
2013-01-23Add a cache buster to all data_rest urls, add caching headers to allBharat Mediratta
data_rest responses, and check cache validity. Fixes #1909.
2013-01-21#1954 - Skip buffer calls for unit tests of file_proxy and data_rest.shadlaws
Moved the "if (TEST_MODE)" statement before the buffer calls in file_proxy and data_rest. This has no impact on normal use, but will make the unit tests more compatible with different server/PHP configurations. Note: We do not have to skip setting the headers, which means we can build unit tests around them if we wish.
2013-01-21Update copyright to 2013. Fixes #1953.Bharat Mediratta
2013-01-21Add unit tests for data_rest. While I'm in there, get rid of theBharat Mediratta
clause that returns nothing when the album has no album cover - we'll fail before that if the album's thumbnail is missing, and if it's not missing then we'll have something to serve even if it's out of date.
2013-01-20#1949 - Fix album thumb mime types given by data_rest and file_proxyshadlaws
Correct result: always "image/jpeg" Old data_rest result: mime of cover item Old file_proxy result: mime of album item (null)
2013-01-19#1942 - Make data_rest and file_proxy more consistent - several minor ↵shadlaws
documentation/formatting changes. No actual functionality changed here.
2012-02-27Update copyright to 2012. #1822Bharat Mediratta
2011-01-21Update copyright to 2011.Bharat Mediratta
2010-09-25Base64 encode the data result if the encoding param is set to "base64".Bharat Mediratta
Fixes #1400.
2010-08-14Return the right content type for album thumbnails (based on the album ↵Bharat Mediratta
cover's mime type)
2010-08-09Change the way that this works. Now instead of sending back the imageBharat Mediratta
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-08Require the size parameter. Optional params are confusing. And beBharat Mediratta
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-08Allow item_rest::put() to replace the current data file. RemoveBharat Mediratta
data_rest::put() altogether; it's no longer necessary.
2010-08-07A new REST resource that allows access to view and modify the actualBharat Mediratta
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.