put_modal_volume_file
Upload files or directories to a specified Modal volume, specifying local and remote paths. Overwrite existing files if required, and receive a result of the operation.
Instructions
Upload a file or directory to a Modal volume.
Args:
volume_name: Name of the Modal volume to upload to.
local_path: Path to the local file or directory to upload.
remote_path: Path in the volume to upload to. Defaults to root ("/").
If ending with "/", it's treated as a directory and the file keeps its name.
force: If True, overwrite existing files. Defaults to False.
Returns:
A dictionary containing the result of the upload operation.
Raises:
Exception: If the upload operation fails for any reason.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
force | No | ||
local_path | Yes | ||
remote_path | No | / | |
volume_name | Yes |
Input Schema (JSON Schema)
{
"properties": {
"force": {
"default": false,
"title": "Force",
"type": "boolean"
},
"local_path": {
"title": "Local Path",
"type": "string"
},
"remote_path": {
"default": "/",
"title": "Remote Path",
"type": "string"
},
"volume_name": {
"title": "Volume Name",
"type": "string"
}
},
"required": [
"volume_name",
"local_path"
],
"title": "put_modal_volume_fileArguments",
"type": "object"
}