Skip to main content

BinaryParameters

@webda/core


Class: BinaryParameters

Defined in: packages/core/src/services/binary.service.ts:1099

Parameters for BinaryService, defining model mappings and max upload size

Extends​

Extended by​

Constructors​

Constructor​

new BinaryParameters(): BinaryParameters

Returns​

BinaryParameters

Inherited from​

ServiceParameters.constructor

Properties​

_maxFileSize​

protected _maxFileSize: number

Defined in: packages/core/src/services/binary.service.ts:1103

max file size


models​

models: object

Defined in: packages/core/src/services/binary.service.ts:1111

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[]


type​

type: string

Defined in: packages/core/src/services/serviceparameters.ts:10

Type of the service

Inherited from​

ServiceParameters.type

Accessors​

maxFileSize​

Get Signature​

get maxFileSize(): number

Defined in: packages/core/src/services/binary.service.ts:1125

Get the max file size in bytes

Returns​

number

the result number

Set Signature​

set maxFileSize(value): void

Defined in: packages/core/src/services/binary.service.ts:1118

Define the maximum filesize to accept as direct upload

Default​
10 MB
Parameters​
value​

string | number

Returns​

void

Methods​

load()​

load(params?): this

Defined in: packages/core/src/services/binary.service.ts:1134

Load parameters with defaults for model mappings and max file size

Parameters​

params?​

any = {}

the service parameters

Returns​

this

this for chaining

Overrides​

ServiceParameters.load


update()​

update(params?, delta): this

Defined in: packages/core/src/services/serviceparameters.ts:35

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​

ServiceParameters.update


with()​

with(callback): this

Defined in: packages/core/src/services/serviceparameters.ts:65

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​

ServiceParameters.with