Fix upload attachment via API

Signed-off-by: Kaijia Feng <feng@kaijia.me>
This commit is contained in:
Kaijia Feng 2023-04-06 15:07:35 +08:00 committed by GitHub
parent ebc7fad1fa
commit aff802713e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,8 +45,8 @@ class AcceptHeaders
public function handle($request, $next): mixed
{
$method = $request->getMethod();
$accepts = ['application/x-www-form-urlencoded', 'application/json', 'application/vnd.api+json', '*/*'];
$contentTypes = ['application/x-www-form-urlencoded', 'application/json', 'application/vnd.api+json'];
$accepts = ['application/x-www-form-urlencoded', 'application/json', 'application/vnd.api+json', 'application/octet-stream', '*/*'];
$contentTypes = ['application/x-www-form-urlencoded', 'application/json', 'application/vnd.api+json', 'application/octet-stream'];
$submitted = (string)$request->header('Content-Type');