Appearance
Upload files
About 177 wordsLess than 1 minute
apiFiles
2025-09-15
MethodPOST
Request URL
/plugin/datafor-modeler/api/repo/files/importAuthorization
The current user must have write permissions in the target directory.
Content Typemultipart/form-data
Request Example
importDir: /public
fileUpload: file://D:\temp\schema-Demo.zip
smart: "true"| Name | Location | Type | Required | Description |
|---|---|---|---|---|
importDir | body | string | No | Default is /public. If empty, the file is uploaded to the root directory. |
fileUpload | body | binary | Yes | The file to upload. |
smart | body | boolean | No | Default is true. If true, new files or directories inherit the uploader's administrator ACL, but existing files retain their ACL. |
Response Examples
✅ Success Response
{
"success": true
}HTTP Responses
| HTTP Status Code | Meaning | Description |
|---|---|---|
| 200 | OK | File uploaded successfully. |
| 400 | Bad Request | Invalid request format or missing parameters. |
| 401 | Unauthorized | Authentication required. |
| 403 | Forbidden | User lacks permission to upload. |
| 500 | Internal Server Error | Unexpected error occurred. |
Response Data Schema
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | true if the upload was successful, false otherwise. |