File
Extends
File
Properties
payload
payload: File;The underlying payload data for this resource
Inherited from
Bkper.File.payloadMethods
create()
create(): File;Perform create new File.
Returns
File
Inherited from
Bkper.File.createdeleteProperty()
deleteProperty(key): this;Deletes a custom property.
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
this
This resource, for chaining
Inherited from
Bkper.File.deletePropertygetBlob()
getBlob(): Blob;Gets the Blob from this file
Returns
Blob
Inherited from
Bkper.File.getBlobgetContent()
getContent(): string;Gets the file content Base64 encoded
Returns
string
Inherited from
Bkper.File.getContentgetContentType()
getContentType(): string;Gets the File content type
Returns
string
Inherited from
Bkper.File.getContentTypegetId()
getId(): string;Gets the File id
Returns
string
Inherited from
Bkper.File.getIdgetName()
getName(): string;Gets the File name
Returns
string
Inherited from
Bkper.File.getNamegetProperties()
getProperties(): object;Gets the custom properties stored in this resource.
Returns
object
Object with key/value pair properties
Inherited from
Bkper.File.getPropertiesgetProperty()
getProperty(...keys): string;Gets the property value for given keys. First property found will be retrieved.
Parameters
| Parameter | Type |
|---|---|
…keys | string[] |
Returns
string
The property value or null if not found
Inherited from
Bkper.File.getPropertygetPropertyKeys()
getPropertyKeys(): string[];Gets the custom properties keys stored in this resource.
Returns
string[]
Array of property keys sorted alphabetically
Inherited from
Bkper.File.getPropertyKeysgetSize()
getSize(): number;Gets the file size in bytes
Returns
number
Inherited from
Bkper.File.getSizegetUrl()
getUrl(): string;Gets the file serving url for accessing via browser
Returns
string
Inherited from
Bkper.File.getUrlgetVisibleProperties()
getVisibleProperties(): object;Gets the visible custom properties stored in this resource. Hidden properties (those ending with ”_”) are excluded from the result.
Returns
object
Object with key/value pair properties, excluding hidden properties
Inherited from
Bkper.File.getVisiblePropertiesjson()
json(): File;Gets an immutable copy of the JSON payload for this resource.
Returns
File
An immutable copy of the json payload
Inherited from
Bkper.File.jsonsetBlob()
setBlob(blob): File;Sets the File properties from a Blob
Parameters
| Parameter | Type |
|---|---|
blob | Blob |
Returns
File
This File, for chainning.
Inherited from
Bkper.File.setBlobsetContent()
setContent(content): File;Sets the File content Base64 encoded.
Parameters
| Parameter | Type |
|---|---|
content | string |
Returns
File
This File, for chainning.
Inherited from
Bkper.File.setContentsetContentType()
setContentType(contentType): File;Sets the File content type.
Parameters
| Parameter | Type |
|---|---|
contentType | string |
Returns
File
This File, for chainning.
Inherited from
Bkper.File.setContentTypesetName()
setName(name): File;Sets the name of the File.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
File
This File, for chainning.
Inherited from
Bkper.File.setNamesetProperties()
setProperties(properties): this;Sets the custom properties of this resource.
Parameters
| Parameter | Type |
|---|---|
properties | { [key: string]: string; } |
Returns
this
This resource, for chaining
Inherited from
Bkper.File.setPropertiessetProperty()
setProperty(key, value): this;Sets a custom property in this resource.
Parameters
| Parameter | Type |
|---|---|
key | string |
value | string |
Returns
this
This resource, for chaining
Inherited from
Bkper.File.setPropertysetVisibleProperties()
setVisibleProperties(properties): this;Sets the custom properties of this resource, filtering out hidden properties. Hidden properties are those whose keys end with an underscore ”_”.
Parameters
| Parameter | Type |
|---|---|
properties | { [key: string]: string; } |
Returns
this
This resource, for chaining
Inherited from
Bkper.File.setVisiblePropertiessetVisibleProperty()
setVisibleProperty(key, value): this;Sets a custom property in this resource, filtering out hidden properties. Hidden properties are those whose keys end with an underscore ”_”.
Parameters
| Parameter | Type |
|---|---|
key | string |
value | string | null |
Returns
this
This resource, for chaining
Inherited from
Bkper.File.setVisibleProperty