Vulcan\HashUpload\HashUpload
Class HashUpload
Synopsis
class HashUpload
extends Upload
{
- // members
- private static integer $max_rename_retries = 30;
- private static string $filename_prefix = 'vd_';
- // methods
- public string getValidFilename()
- public string generateFilenameHash()
Hierarchy
Extends
- SilverStripe\Assets\Upload
Members
private
- $filename_prefix
—
string
Prefixes all filenames with this string - $max_rename_retries
—
int
The amount of tries that a rename will be attempted if the first already exists
Methods
public
- generateFilenameHash() — Generates a hashed filename and returns it with the folder path included if provided
- getValidFilename() — Takes the result from the parent and hashes the filename