File
abstract class File implements HasName, HasProviderOptions
Properties
| string|null | $name | ||
| string|null | $mime | ||
| protected array<string, string>|SerializableClosure | $headers | ||
| protected array<string, mixed>|SerializableClosure | $providerOptions |
Methods
Get a required value from the file representation.
Get the displayable name of the file.
Specify HTTP headers for the file upload. Closures may only capture serializable values.
Specify provider-specific options for the file upload. Closures may only capture serializable values.
Get the provider-specific options for the file upload.
Get the HTTP headers for the file upload.
Get the file's MIME type.
Set the file's MIME type.
Details
at line 29
static File|null
fromArray(array $data)
Reconstruct a file instance from its array representation.
at line 70
static protected string
value(array $data, string $key, string $type)
Get a required value from the file representation.
at line 82
string|null
name()
Get the displayable name of the file.
at line 90
HasName
as(string|null $name)
Set the displayable name of the file.
at line 102
File
withHeaders(array|Closure $headers)
Specify HTTP headers for the file upload. Closures may only capture serializable values.
at line 116
File
withProviderOptions(array|Closure $options)
Specify provider-specific options for the file upload. Closures may only capture serializable values.
at line 130
array
providerOptions(Lab|string $provider)
Get the provider-specific options for the file upload.
at line 142
array
headers(Lab|string $provider)
Get the HTTP headers for the file upload.
at line 152
string|null
mimeType()
Get the file's MIME type.
at line 160
File
withMimeType(string $mimeType)
Set the file's MIME type.