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

Members

App : App instance #

config instance #

Store parameters as defined in ubConfig

historyDepth : number instance #

How many previous revision is stored

name instance #

Name of store (from app config)

Session : UBSession instance #

tempFolder : String instance #

Path to temp folder

Methods

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

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)→Boolean instance #

Fill HTTP response for getDocument request

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

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)→string instance #

Get path to temporary file and it's name

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

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)→BlobStoreItem instance #

Implementation must save file content to temporary store

Arguments info: