-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected status code (400) while uploading chunk #98
Comments
You are likely missing a CloudFlare-specific settings, such as a header or URL parameter. I have no experience with their services, so I cannot help you much here. Maybe this discussion can lead you to a solution: tus/tus-java-client#66 |
Have added header something like below one when i try to init tusclient. Is there any problem in it @Acconut? try {
|
Don't set Content-Type because tus-java-client has to change it. Also, I don't know if CloudFlare requires any other headers. Please look that up in their documentation. |
If we won't set Content-Type then also same error and Authentication header is require to cloudflare for authenticate it. According to cloudflare doc it require below things: curl -X POST \n This attached ss is of error which we get with tusclient: |
I don't know CloudFlare's API but your request looks different than from what is described in their docs: https://developers.cloudflare.com/api/operations/stream-videos-initiate-video-uploads-using-tus |
Have updated same headers and check still same error is there: io.tus.java.client.ProtocolException: unexpected status code (400) while creating upload |
The actual error message is probably available in the response body, but there is currently no easy way in tus-java-client to receive this body. That is something we have to improve in our API. You could try the approach provided in tus/tus-java-client#89 to try and receive the response body from CloudFlare. |
I had hoped for a more descriptive error message. My knowledge ends here and the reason for the error is probably something Cloudflare-specific. Maybe your environment doesn't support PATCH, which requires tus-java-client to use X-HTTP-Method-Override, which may not be supported by Cloudflare: tus/tus-java-client#66 (comment) |
When i try to upload video on cloudflare unable to upload it and get io.tus.java.client.ProtocolException: unexpected status code (400) while uploading chunk error.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
We can upload duplicate video all time no restriction is required
Setup details
The text was updated successfully, but these errors were encountered: