Skip to content

Set the right Content-Type #995

Description

@lukasm91

We are using nextcloud-upload through photos, and we realized that all uploads that go through this library are creating PUTrequests with Content-Type as application/x-www-form-urlencoded.

This is certainly not correct for these uploads, and some hosters will just deny such requests because invalid characters are passed as form data.

I suggest something like adding
headers: {'Content-Type': data.type},
to the PUT request in lib/utils/upload.ts, or just hardcode application/octet-stream.

Since I am not an expert in this at all, there might be better ways to handle this...

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions