コード例 #1
0
function handleGetThumbnails($albumname)
{
    OCP\Response::enableCaching(3600 * 24);
    // 24 hour
    $thumbnail = OC::$CONFIG_DATADIRECTORY . '/../gallery/' . urldecode($albumname) . '.png';
    header('Content-Type: ' . OC_Image::getMimeTypeForFile($thumbnail));
    OCP\Response::sendFile($thumbnail);
}
コード例 #2
0
ファイル: galleryOp.php プロジェクト: blablubli/owncloudapps
function handleGetThumbnails($albumname)
{
    OCP\Response::enableCaching(3600 * 24);
    // 24 hour
    $view = OCP\Files::getStorage('gallery');
    $thumbnail = $view->fopen(urldecode($albumname) . '.png', 'r');
    header('Content-Type: ' . OC_Image::getMimeTypeForFile($thumbnail));
    OCP\Response::sendFile($thumbnail);
}
コード例 #3
0
ファイル: sharing.php プロジェクト: blablubli/owncloudapps
function handleGetPhoto($token, $photo)
{
    $owner = OC_Gallery_Sharing::getTokenOwner($token);
    $view = OCP\Files::getStorage('files');
    $file = $view->fopen(urldecode($photo), 'r');
    header('Content-Type: ' . OC_Image::getMimeTypeForFile($file));
    OCP\Response::sendFile($file);
}
コード例 #4
0
ファイル: sharing.php プロジェクト: noci2012/owncloud
function handleGetPhoto($token, $photo)
{
    $owner = OC_Gallery_Sharing::getTokenOwner($token);
    $file = OCP\Config::getSystemValue("datadirectory", OC::$SERVERROOT . "/data") . '/' . $owner . '/files' . urldecode($photo);
    header('Content-Type: ' . OC_Image::getMimeTypeForFile($file));
    OCP\Response::sendFile($file);
}