fix(media-api): don't send Content-Type header

Apparently, multer gets confused by a content-type header: https://stackoverflow.com/questions/49692745/express-using-multer-error-multipart-boundary-not-found-request-sent-by-pos

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2022-12-28 18:10:38 +01:00
parent b311265762
commit be7983b9be

View file

@ -35,7 +35,6 @@ export const uploadFile = async (noteIdOrAlias: string, media: Blob): Promise<Me
const postData = new FormData()
postData.append('file', media)
const response = await new PostApiRequestBuilder<MediaUpload, void>('media')
.withHeader('Content-Type', 'multipart/form-data')
.withHeader('HedgeDoc-Note', noteIdOrAlias)
.withBody(postData)
.sendRequest()