Skip to content

Pass contentType from .write to form.append #4

@amurchick

Description

@amurchick

Sometime needs direct assign of content-type when write file to seaweedfs.

To do this - simply change line https://github.com/atroo/node-weedfs/blob/master/lib/weedfs.js#L83:

form.append("file", stream ? stream : file[i]);

to:

form.append("file", stream ? stream : file[i], opts);

And this allowed assign content-type like this:

weed.write('./file', {contentType: 'image/png'})

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