new BlobStoreCustom(storeConfig: Object, appInstance: App, sessionInstance: UBSession)#


App: Appinstance #

configinstance #

Store parameters as defined in ubConfig

historyDepth: numberinstance #

How many previous revision is stored

nameinstance #

Name of store (from app config)

Session: UBSessioninstance #

tempFolder: Stringinstance #

Path to temp folder


doArchive(attribute: UBEntityAttribute, ID: Number, blobInfo: BlobStoreItem)→BlobStoreIteminstance#

Do something with BLOB content during archiving. For example - move to slow drive etc. Default implementation do nothing.

doDeletion(attribute: UBEntityAttribute, ID: Number, blobInfo: BlobStoreItem)instance#

Delete persisted BLOB content

fillResponse(requestParams: BlobStoreRequest, blobInfo: BlobStoreItem, req: THTTPRequest, resp: THTTPResponse)→Booleaninstance#

Fill HTTP response for getDocument request

getContent(request: BlobStoreRequest, blobInfo: BlobStoreItem, optionsopt: Object)→String | ArrayBufferinstance#

Retrieve BLOB content from blob store.

Arguments info:

  • options: Object
    • encoding: String

      Default to 'bin'. Possible values: 'bin'|'ascii'|'utf-8' If undefined UB will send query to entity anf get it from DB. At last one parameter {store: storeName} should be defined to prevent loading actual JSON from DB

  • blobInfo: BlobStoreItem

    JSON retrieved from a DB.

getTempFileName(request: BlobStoreRequest)→stringinstance#

Get path to temporary file and it's name

persist(attribute: UBEntityAttribute, ID: Number, dirtyItem: BlobStoreItem, newRevision: number)→BlobStoreIteminstance#

Move content defined by dirtyItem from temporary to permanent store. Return a new attribute content which describe a place of BLOB in permanent store

saveContentToTempStore(request: BlobStoreRequest, attribute: UBEntityAttribute, content: ArrayBuffer)→BlobStoreIteminstance#

Implementation must save file content to temporary store

Arguments info: