> For the complete documentation index, see [llms.txt](/llms.txt)

# GS2-Datastore Script Trigger Reference

Reference for event triggers that call extended scripts



## Trigger

### doneUpload

Report completion of data object upload

**Related methods:**
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](../sdk/#namespace) | Namespace |
| dataObject | [DataObject](../sdk/#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


**Lua**
```lua

-- 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](../sdk/#namespace) | Namespace |
| dataObject | [DataObject](../sdk/#dataobject) | Data object |


##### Implementation Example


**Lua**
```lua

-- Request
local namespace = args.namespace
local dataObject = args.dataObject

-- Asynchronous scripts typically do not affect the API response.
-- These scripts are typically used for logging, analytics, external notifications, and similar purposes.

result = {
}
```


---
  



