Extends the file object with a load method to easily create file objects from file path

Maintainers

Package info

github.com/andrelohmann/silverstripe-extended-file

Type:silverstripe-module

pkg:composer/andrelohmann-silverstripe/extended-file

Statistics

Installs: 1 354

Dependents: 1

Suggesters: 0

Stars: 2

Open Issues: 3

1.1.0 2016-01-05 15:31 UTC

This package is auto-updated.

Last update: 2026-03-01 00:21:39 UTC


README

Maintainers

  • Andre Lohmann (Nickname: andrelohmann)

Requirements

Silverstripe 3.2.x

Introduction

This module extends the File class with a load method, that allows to create file objects from path and a CloudURL Method, that allows to use a thirdparty CDN Domain for all Files.

Usage

// Load from File
$File = new File();
$File->load(FILE_PATH, TARGET_PATH);

// use CDN URL
Config::inst()->update('ExtendedFile', 'cloud_url', YOUR_CDN_DOMAIN);
echo $File->getCloudURL();