Skip to main content

StorageParameters

@webda/gcp


Class: StorageParameters

Defined in: gcp/src/services/storage.service.ts:67

Configuration for Storage

Extends​

  • CloudBinaryParameters

Constructors​

Constructor​

new StorageParameters(): StorageParameters

Returns​

StorageParameters

Inherited from​

CloudBinaryParameters.constructor

Properties​

_maxFileSize​

protected _maxFileSize: number

Defined in: core/lib/services/binary.service.d.ts:660

max file size

Inherited from​

CloudBinaryParameters._maxFileSize


_maxUploadSize?​

protected optional _maxUploadSize?: number

Defined in: core/lib/services/binary.service.d.ts:661

Inherited from​

CloudBinaryParameters._maxUploadSize


bucket​

bucket: string

Defined in: gcp/src/services/storage.service.ts:71

Bucket to store binaries in


contentStorage?​

optional contentStorage?: object

Defined in: core/lib/services/cloudbinary.d.ts:10

default?​

optional default?: boolean

register?​

optional register?: boolean

Inherited from​

CloudBinaryParameters.contentStorage


credentialProfiles?​

optional credentialProfiles?: Record<string, Pick<StorageOptions, "credentials" | "keyFilename" | "projectId">>

Defined in: gcp/src/services/storage.service.ts:83

Named credentials selectable through ?credential=<name> in content URLs.


credentials?​

optional credentials?: JWTInput | ExternalAccountClientOptions

Defined in: gcp/src/services/storage.service.ts:77

Default service account credentials, otherwise application default credentials are used.


endpoint?​

optional endpoint?: string

Defined in: gcp/src/services/storage.service.ts:75

Specify endpoint for GCS


keyFilename?​

optional keyFilename?: string

Defined in: gcp/src/services/storage.service.ts:79

Path to the default service account key file.


models​

models: object

Defined in: core/lib/services/binary.service.d.ts:675

Define the map of models

  • indicates all models

key is a Store name the string[] represent all valids attributes to store files in * indicates all attributes

Index Signature​

[key: string]: string[]

Inherited from​

CloudBinaryParameters.models


prefix?​

optional prefix?: string

Defined in: core/lib/services/cloudbinary.d.ts:9

Inherited from​

CloudBinaryParameters.prefix


projectId?​

optional projectId?: string

Defined in: gcp/src/services/storage.service.ts:81

Project used with the default credentials.


type​

type: string

Defined in: core/lib/services/serviceparameters.d.ts:9

Type of the service

Inherited from​

CloudBinaryParameters.type


urlExpiry​

urlExpiry: number

Defined in: core/lib/services/binary.service.d.ts:667

Lifetime in seconds of the signed URLs

Default​

30

Inherited from​

CloudBinaryParameters.urlExpiry

Accessors​

maxFileSize​

Get Signature​

get maxFileSize(): number

Defined in: core/lib/services/binary.service.d.ts:697

Get the max file size in bytes

Returns​

number

the result number

Set Signature​

set maxFileSize(value): void

Defined in: core/lib/services/binary.service.d.ts:683

Define the maximum filesize to accept as direct upload

Default​
10 MB
Parameters​
value​

string | number

Returns​

void

Inherited from​

CloudBinaryParameters.maxFileSize


maxUploadSize​

Get Signature​

get maxUploadSize(): number | undefined

Defined in: core/lib/services/binary.service.d.ts:688

Maximum size accepted for a direct-to-bucket upload, undefined means no limit

Returns​

number | undefined

the limit in bytes or undefined

Set Signature​

set maxUploadSize(value): void

Defined in: core/lib/services/binary.service.d.ts:692

Maximum size accepted for a direct-to-bucket upload, undefined means no limit

Parameters​
value​

string | number | undefined

Returns​

void

Inherited from​

CloudBinaryParameters.maxUploadSize

Methods​

load()​

load(params): this

Defined in: core/lib/services/cloudbinary.d.ts:19

Load parameters with an empty prefix default

Parameters​

params​

any

the service parameters

Returns​

this

this for chaining

Inherited from​

CloudBinaryParameters.load


update()​

update(params, delta): this

Defined in: core/lib/application/parameters.d.ts:21

Update parameters and call watchers if a parameter was changed

Parameters​

params​

any

the service parameters

delta​

any

the delta

Returns​

this

this for chaining

Inherited from​

CloudBinaryParameters.update


with()​

with(callback): this

Defined in: core/lib/application/parameters.d.ts:27

Watch for changes on the parameters and call watchers when a parameter is changed

Parameters​

callback​

(params) => void

the callback function

Returns​

this

this for chaining

Inherited from​

CloudBinaryParameters.with