Skip to content

Files uploaded using FormData placed incorrectly within collection. #931

@pythonicode

Description

@pythonicode

UPDATE

I'm getting the expected behavior when running estuary locally and making requests to localhost:3004 from my app, but when I make requests to api.estuary.tech I'm getting the extra directory issue.

The only difference I can tell between the requests is that the request to api.estuary.tech is using an perms=upload API key so I will try testing to see if that makes any difference.

This is also reproducible behavior if you use the Estuary docs.

ISSUE

Describe the bug
When uploading files using FormData to /content/add?coluuid=[coluuid]&overwrite=true&dir=/ causes to files not to exist in the root directory / but instead under a subdirectory with the file name for example under /[file name].

To Reproduce
Upload a file using FormData and dir=/ and coluuid=[coluuid] then check result of /collection/:coluuid.

Expected behavior
Uploaded file should be under root directory as specified by search param dir

Actual behavior
Uploaded file is under a subdirectory with the same name as the file.

Additional context
Slack discussion: https://filecoinproject.slack.com/archives/C016APFREQK/p1677178196959089

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething that should be fixed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions