Skip to content

Allow uploading directories #125

@Ambrevar

Description

@Ambrevar

At the moment sending a request with a parameter like

("file" #p"/path/to/dir/" :content-type "application/x-directory")

fails because send-content tries to read the dir.
Suggested fix in send-content:

((pathnamep content)
           (when (uiop:file-exists-p content)
             (with-open-file (from content :element-type 'octet)
               ;; calls itself with a stream now
               (send-content from stream))))

For context, I'm trying to upload directories to IPFS:

http://docs.ipfs.tech.ipns.localhost:8080/reference/kubo/rpc/#api-v0-add

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions