GS2-Datastore Script Trigger Reference

Reference for 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
Type Description
namespace Namespace Namespace
dataObject DataObject Data object
objectUrl string URL of the uploaded object
Result
Type Required Default Value Limits Description
permit bool
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
Type Description
namespace Namespace Namespace
dataObject DataObject Data 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 = {
}