Closed afsh7n closed 1 year ago
Hello. I see you've also asked this question on Stack Overflow.
Looking at the code, the media type application/json
happens when $resumable
is false (see here and here).
So I would try setting $resumable = true
(which is the fifth argument to MediaFileUpload
). You can see an example of this in large-file-upload.php
.
Hello, have a good time, I use Google api v3 to upload videos to YouTube. Unfortunately, I am facing this error since yesterday without any changes in the code or the server.
I searched the error text in different parts, but I didn't get any results. The only thing I found is that inside this package and this file at this address src/Http/MediaFileUpload.php The content-type is specified, whose value is application/json; charset=UTF-8 is set. I guess this is the problem. Please guide me.
Thank you
Environment details
Steps to reproduce
"error": { "code": 400, "message": "Media type 'application/json; charset=UTF-8' is not supported. ", "errors": [ { "message": "Media type 'application/json; charset=UTF-8' is not supported. ", "domain": "global", "reason": "badRequest" } ], "status": "INVALID_ARGUMENT" }
Code example