# Get Base Attachment Upload Link

Get the attachment upload link to a base. Images should be uploaded to the `img_relative_path`, all other files should be uploaded to the `file_relative_path`.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Account Operations - User",
    "description": "The official SeaTable API Reference (OpenAPI 3.0).",
    "version": "6.2"
  },
  "servers": [
    {
      "url": "https://{server}",
      "variables": {
        "server": {
          "default": "cloud.seatable.io"
        }
      }
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "metrics-enabled": false,
    "proxy-enabled": false
  },
  "tags": [
    {
      "name": "Attachment",
      "description": "Manage attachments"
    }
  ],
  "components": {
    "securitySchemes": {
      "AccountTokenAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "This is the [Account-Token](/reference/authentication)."
      }
    },
    "parameters": {
      "base_name_query": {
        "name": "base_name",
        "description": "name of your base",
        "in": "query",
        "schema": {
          "type": "string"
        },
        "required": true,
        "example": "My Projects"
      },
      "workspace_id": {
        "name": "workspace_id",
        "description": "id of your workspace.",
        "in": "path",
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "required": true,
        "example": 127
      }
    }
  },
  "paths": {
    "/api/v2.1/workspace/{workspace_id}/dtable-asset-upload-link/": {
      "get": {
        "tags": [
          "Attachment"
        ],
        "summary": "Get Base Attachment Upload Link",
        "operationId": "getBaseAttachmentUploadLink",
        "description": "Get the attachment upload link to a base. Images should be uploaded to the `img_relative_path`, all other files should be uploaded to the `file_relative_path`.",
        "security": [
          {
            "AccountTokenAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/workspace_id"
          },
          {
            "$ref": "#/components/parameters/base_name_query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "upload_link": {
                      "type": "string"
                    },
                    "parent_path": {
                      "type": "string"
                    },
                    "img_relative_path": {
                      "type": "string"
                    },
                    "file_relative_path": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "upload_link": "https://cloud.seatable.io/seafhttp/upload-api/5d2b06ba-ec8d-4efb-a62e-3ae6ac84a67c",
                  "parent_path": "/asset/o09eab5d-a796-4ef5-909d-b491c9a056a0",
                  "img_relative_path": "images/2020-11",
                  "file_relative_path": "files/2020-11"
                }
              }
            }
          }
        }
      }
    }
  },
  "_id": {
    "buffer": {
      "0": 105,
      "1": 212,
      "2": 220,
      "3": 12,
      "4": 20,
      "5": 34,
      "6": 131,
      "7": 31,
      "8": 141,
      "9": 111,
      "10": 187,
      "11": 147
    }
  }
}
```