Skip to content

Expected primitive type, got <class 'pocketbase.models.file_upload.FileUpload'> #122

Description

@Fanom2813

Hello , i have followed the example how to upload a file but it keeps failing with error Expected primitive type, got <class 'pocketbase.models.file_upload.FileUpload'>: <pocketbase.models.file_upload.FileUpload object at 0x115260b10>

data = {
 "images": [
                FileUpload(("image.png", open(image_path, "rb"))),
            ]
...
}

record = pb_client.collection('example').create(data)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions