GS2-Datastore Script Trigger Reference

Reference of event triggers that call extended scripts

Trigger

doneUpload

Report completion of data object upload

Synchronous Execution Script

The script is executed synchronously before the report completion of data object upload process.

Request
TypeDescription
namespaceNamespaceNamespace
dataObjectDataObjectData object
objectUrlstringURL of the uploaded object
Result
TypeRequiredDefaultValue LimitsDescription
permitbool
Whether to allow report completion of data object upload
Implementation Example
-- Request
local namespace = args.namespace
local dataObject = args.dataObject
local objectUrl = args.objectUrl

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}

Asynchronous Execution Script

The script is executed asynchronously after the report completion of data object upload process.

Request
TypeDescription
namespaceNamespaceNamespace
dataObjectDataObjectData object
Implementation Example
-- Request
local namespace = args.namespace
local dataObject = args.dataObject

-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.

result = {
}