Documents

Attach document URLs

You can import documents by linking them from external storages. The linked documents are displayed in SuperAnnotate, but they aren't stored in our local servers.

Step 1: Enable CORS in your storage

Make sure to enable cross-origin resource sharing (CORS) for the storages you will be using.

Amazon S3 bucket

  1. In your bucket, go to Permissions.
  2. Turn off Block all public access.
  3. Insert this configuration in the CORS section.
[
    {
        "AllowedHeaders": [],
        "AllowedMethods": [
            "GET"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": []
    }
]
  1. Click Save changes.

Step 2: Create a CSV file containing the document URLs

To attach document URLs, create a CSV file that contains the URLs. Use this template CSV file as a reference.

Key

Required/Optional

Value

url

Required

Document URL

name

Optional

Document name

📘

If the document name field is empty, a name ID will be generated based on the row ID and a random UUID.

Step 3: Attach the document URLs via Python SDK

Link your documents to the project with this SDK command.

sa.attach_document_urls_to_project(
    project = "Project Name", 
    attachments = "./documents.csv",
    annotation_status = "QualityCheck")
superannotatecli attach-document-urls --project “Project Name/Folder Name” --attachments “./documents.csv” --annotation_status “QualityCheck”

Did this page help you?