hypejunction / proxy
为从Elgg文件存储服务文件的代理
2.0.0
2015-12-29 20:51 UTC
Requires
- php: >=5.5
- composer/installers: 1.*
README
为从Elgg文件存储服务文件的代理
特性
- 从Elgg文件存储服务文件的API
- 最小化引擎启动和缓存
- 基于HMAC的安全层
安装
composer require hypejunction/proxy
使用
生成下载链接
// Get a link to download a file // By default, link's validity is limited to 2 hours and restricted to current user session $file = get_entity($file_guid); $download_link = elgg_get_download_url($file);
显示图像/缩略文件
// Get a link to display an icon // By default, link's validity is limited to 1 year and can be reused outside of the current user session $icon = new ElggFile(); $icon->owner_guid = $owner_guid; $icon->setFilename("path/to/icon.jpg"); $icon_link = elgg_get_inline_url($icon);