Skip to main content

StorageParameters

@webda/gcp


Class: StorageParameters

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

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:699

max file size

Inherited from​

CloudBinaryParameters._maxFileSize


_maxUploadSize?​

protected optional _maxUploadSize?: number

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

Max upload size

Inherited from​

CloudBinaryParameters._maxUploadSize


bucket​

bucket: string

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

Bucket to store binaries in


contentStorage?​

optional contentStorage?: object

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

Content storage

default?​

optional default?: boolean

register?​

optional register?: boolean

Inherited from​

CloudBinaryParameters.contentStorage


credentialProfiles?​

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

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

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


credentials?​

optional credentials?: JWTInput | ExternalAccountClientOptions | GdchCredentialsInput

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

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


endpoint?​

optional endpoint?: string

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

Specify endpoint for GCS


keyFilename?​

optional keyFilename?: string

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

Path to the default service account key file.


models​

models: object

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

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:12

Prefix

Inherited from​

CloudBinaryParameters.prefix


projectId?​

optional projectId?: string

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

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:709

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:739

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:725

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:730

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:734

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:25

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