diff options
author | Thomas Willingham <founder@kakste.com> | 2013-02-02 14:56:17 +0000 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2013-02-02 14:56:17 +0000 |
commit | 0f13ae0ade10d6d2b0ef185ae6d6cc2d35831433 (patch) | |
tree | 7d6ac98d5f0b4e10ef86ba0f312401830c751250 /include/attach.php | |
parent | 1633f95db8a004055e51d1580fa4394527ca8a91 (diff) | |
parent | 5c6c4395f4ab7924cad619d3a1ca4cee69219769 (diff) | |
download | volse-hubzilla-0f13ae0ade10d6d2b0ef185ae6d6cc2d35831433.tar.gz volse-hubzilla-0f13ae0ade10d6d2b0ef185ae6d6cc2d35831433.tar.bz2 volse-hubzilla-0f13ae0ade10d6d2b0ef185ae6d6cc2d35831433.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/attach.php')
-rw-r--r-- | include/attach.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/attach.php b/include/attach.php index b2c57f36f..e4ef28637 100644 --- a/include/attach.php +++ b/include/attach.php @@ -1,5 +1,14 @@ <?php +/* + * File/attach API with the potential for revision control. + * + * TODO: a filesystem storage abstraction which maintains security (and 'data' contains a system filename + * which is inaccessible from the web). This could get around PHP storage limits and store videos and larger + * items, using fread or OS methods or native code to read/write or chunk it through. + * Also an 'append' option to the storage function might be a useful addition. + */ + require_once('include/permissions.php'); function z_mime_content_type($filename) { @@ -151,6 +160,8 @@ function attach_list_files($channel_id, $observer, $hash = '', $filename = '', $ } +// Find an attachment by hash and revision. Returns the entire attach structure including data. +// This could exhaust memory so most useful only when immediately sending the data. function attach_by_hash($hash,$rev = 0) { |