Skip to content

files.create with string : bad contentType,  #137

@jacquarg

Description

@jacquarg

In MyAccount, I've got a file as a base64 string (extracted froma XML field from an API), and I wish to create a File with it, using nodeJS.
I use the "contentType" option, with value application/pdf, but, the created file isn't readable, my pdf reader complaining that the contentType is text/plain : https://github.com/jacquarg/cozy-konnector-libs/blob/83b44bc935910f82707c7cb3bed1360f993ebaa4/models/file.js#L39

I can give you easily some code to reproduce if you want.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions