为从Elgg文件存储服务文件的代理

安装: 161

依赖: 0

建议者: 0

安全: 0

星星: 0

观察者: 2

分支: 2

开放问题: 0

类型:elgg-plugin

2.0.0 2015-12-29 20:51 UTC

This package is auto-updated.

Last update: 2024-08-29 04:03:30 UTC


README

Elgg 2.0

为从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);