Commit graph

76 commits

Author SHA1 Message Date
Aaron Schulz
81ebc15b05 [FileRepo] [FileBackend] Added support for custom file headers.
* For backends that support it, custom HTTP headers can be set on files.
* Added a getStreamHeaders() function to MediaHandler to let subclasses
  recommend header name/value pairs to be used for responses to GET/HEAD
  requests. For example, an OGG handler could set "X-Content-Duration".
* Made LocalFile use this function to set HTTP headers of new uploads.

Change-Id: I1b017e1342513f0097fe6d142aae18e819403293
2012-11-20 14:07:02 -08:00
Aaron Schulz
6c9f13b547 [FileBackend] Added optional callback parameter to concatenate().
* This lets callers update the cache/db with the operation progress so that
  APIs can be made to use this and expose this information to client polling.

Change-Id: I9a86c1c5ffccf029be5a150e5998c3ce4740ec62
2012-11-18 14:02:45 -08:00
Aaron Schulz
9f95bddda7 [FileBackend] Added getFileHttpUrl() function.
* This can speed up certain video file operations for scripts that support
  specifying source files via URLs and support HTTP Range headers.
* Updated unit tests.

Change-Id: I60cb95c2e3dd9f7df1f740e9182be7c79af69d6e
2012-11-08 23:01:19 +00:00
Aaron Schulz
24a6e8eab6 [FileBackend] Support "ignoreMissingSource" for copy and move operations.
* This lets callers use "copy if exist" semantics more easily and avoids extra stat
  queries to the backend (since the cache is cleared before doOperations()).
* Tweaked FileOp::fileSha1() to reduce backend stat requests as 404s are not cached.

Change-Id: Icb5ca14b3316f273d53593f48979d14e113990e1
2012-10-31 04:24:05 +00:00
Aaron Schulz
030c0277a9 [FileBackend] Added tiny getContainerStoragePath() convenience function.
Change-Id: Icc16c75f0cbfcf247628d0649386e52f1f25d335
2012-10-10 15:11:26 -07:00
Siebrand Mazeland
d4b046a893 Update docs for return and exception info
* Removed some inline tabs in the process.
* IDE fixed some incorrect leading spaces, too.

Change-Id: Ic9303eff6db4424ac3f1fa2816839692b43e6190
2012-10-09 09:41:58 +00:00
Brion VIBBER
4c01cfb10c Merge "[FileBackend] Optimized concatenate() to use getLocalReferenceMulti()." 2012-10-03 20:03:35 +00:00
Brion VIBBER
a570a73510 Merge "[FileBackend] Added getFileContentsMulti() and improved it for Swift." 2012-10-03 20:01:46 +00:00
Brion VIBBER
ba652c59fa Merge "[FileBackend] Added getLocalCopyMulti() and getLocalReferenceMulti()." 2012-10-03 19:54:34 +00:00
Aaron Schulz
43b95bbe8b Added doc note about getWikiId().
Change-Id: I9c078baf84e0fead743e5315f698bd287ecf9f13
2012-09-26 09:45:21 -07:00
Aaron
dfb0d94c99 [FileBackend] Added FileBackend::getWikiID() function.
Change-Id: Idd9be6c72d494fad37ac62e274c1e115ff97cdec
2012-09-24 15:38:37 -07:00
Aaron Schulz
dcb81eef85 [FileBackend] Optimized concatenate() to use getLocalReferenceMulti().
Change-Id: I884eb3fc27adb48ec6761143190cc622f1de2dca
2012-09-22 11:46:48 -07:00
Aaron Schulz
8641c9af9d [FileBackend] Added getFileContentsMulti() and improved it for Swift.
Change-Id: I6a2173eccda8fe7d4e2e779421e6edf05c8201b4
2012-09-22 11:01:58 -07:00
Aaron
ae65453e84 [FileBackend] Added getLocalCopyMulti() and getLocalReferenceMulti().
* Optimized these in Swift to use pipelined GETs.
* This can also be used to improve concatenate().

Change-Id: Ibeb5df7532f9f5c16736b20c28b7c0d9ddfb412f
2012-09-21 21:10:54 -07:00
Aaron
d97f671fdf [FileBackend] Factored out setConcurrencyFlags() function.
* This moves some options code from FileBackend to FileBackendStore,
  where it belongs. This also allows for reuse by other operations.

Change-Id: Ic9a7d36a6e4bc6b815a7d68926105401f65c53fb
2012-09-18 16:04:30 -07:00
Aaron Schulz
552507ffdc Tweaked various FileBackend docs.
Change-Id: Ie64fa644802b393ecbbb4db4b026bc45511de2ac
2012-09-15 23:43:18 -07:00
Aaron Schulz
8696c8336f Moved down rarely used option flag and added @since.
Change-Id: I801bd0ab4099245499a0eb4b060f143879164278
2012-09-13 21:31:59 -07:00
Aaron
da05f24bf2 [FileBackend] Work-around low header value limits in Swift.
* Also added sanity check to makeContentDisposition() and made the file name optional

Change-Id: Ie4bfef743d11227631606498f026e693dd8d21f3
2012-09-06 10:27:43 -07:00
Aaron Schulz
a441f03e32 Added @since to new function.
Change-Id: If15c11df7f460bea6c748584442970065fdaaaae
2012-09-02 00:33:19 -07:00
Aaron
a99aa9b007 Cleaned up some whitespace from 45b9073b61
Change-Id: I42e376d80d6cc483b96e815d63b19aee78fe1127
2012-08-31 16:24:19 -07:00
Aaron
45b9073b61 [FileBackend] Added Content-Disposition support to Swift.
* Renamed $handle => $op to avoid line breaks in a few spots.

Change-Id: I4598e685cc27552425a47f9d97eaeddaaf1a64a1
2012-08-31 16:00:47 -07:00
Catrope
84a54a63c5 Merge "[FileBackend] Added preloadCache() so callers can trigger cache getMulti()." 2012-08-29 00:13:57 +00:00
Aaron Schulz
68808d7b9f [FileBackend] Added preloadCache() so callers can trigger cache getMulti().
Change-Id: I2a30b4bfc16b4303abcb1f71206234dd2e0403af
2012-08-28 17:10:20 -07:00
Aaron Schulz
feb7a3e10e [FileBackend] Reduced stat calls when using the multiwrite backend.
Change-Id: I46805637a9dcaaea597bf6eeba204a6889a36a51
2012-08-26 02:11:31 -07:00
Siebrand Mazeland
9ff9aaae63 Fix typo: occured -> occurred.
Change-Id: I5e66fdd52791487f81796ae1965ac31c94b36182
2012-08-10 10:59:55 +02:00
Aaron Schulz
a47892abef [FileBackend] Moved filerepo/backend/ up to filebackend
Change-Id: I62ba23bd22e0f177fb48acaf6bcc38cbffacd3e7
2012-08-08 18:20:57 -07:00
Renamed from includes/filerepo/backend/FileBackend.php (Browse further)