Codem\DamnFineUploader\UploadPage
A page that handles file uploads This page requires extension in code to handle file upload response to the user as such it can only be created, edit and published by those with allowed permissions
Synopsis
class UploadPage
extends Page
implements
PermissionProvider
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static array $defaults = ;
- private static string $table_name = 'DamnFineUploaderPage';
- private static string $singular_name = 'A page that handles file uploads';
- private static string $plural_name = 'Pages that handle file uploads';
- private static string $description = 'Allows multiple uploads, requires customisation in code.';
- // methods
- public bool canPublish()
- public bool canEdit()
- public bool canCreate()
- public void providePermissions()
- public void getCMSFields()
- // Inherited methods from CMSFieldConfigurator
- public static float get_php_max_file_size()
- public void getPHPMaxFileSizeMB()
- public array getAllowedMimeTypes()
- public array getMimeTypes()
- public FieldList addGenericFields()
Hierarchy
Extends
- Page
Uses
Implements
- SilverStripe\Security\PermissionProvider
Members
private
- $db
- $defaults
—
array
Add default values to database - $description — string
- $has_one
- $plural_name
—
string
Plural name for CMS - $singular_name
—
string
Singular name for CMS - $table_name
Methods
public
- canCreate() — Check if this page can be created Member needs the UPLOAD_PAGE_CREATE to create this page
- canEdit() — Check if this page can be edited Member needs the UPLOAD_PAGE_EDIT to create this page
- canPublish() — Check if this page can be published Member needs the UPLOAD_PAGE_PUBLISH to create this page
- getCMSFields() — CMS editing fields for configuration
- providePermissions() — Return permissions this page provides
Inherited from Codem\DamnFineUploader\CMSFieldConfigurator
public
- addGenericFields()
- getAllowedMimeTypes() — Get the allowed mime types, based on the selected file types
- getMimeTypes() — This is pinched from MimeUploadValidator
- getPHPMaxFileSizeMB()
- get_php_max_file_size()