I'm using OAuth consumer to upload files to clients repo described here -
Whenever I'm uploading files up to 1 mb everything running smoothly, when file size exceeds 1,5 mb I'm getting 400 error code without explanation, I suggest problem has to do with size limitation of this api or something on the user's side (his repo size limitations), tried it for multiple users, same result
Here's my code -
Hi Mikhail,
The 400 error indicates a bad request, for example, it might be a missing attribute/parameter.
The limit for uploading a file via API is 500 MB (https://jira.atlassian.com/browse/BCLOUD-18999), which is well above the size of the files you are uploading.
Are you able to upload one of these files using a curl command as follows?
curl -X POST -u username:app-password https://api.bitbucket.org/2.0/repositories/<workspace-id>/<repo-slug>/src -F /repo/path/to/myFile.json=@myFile.json -F branch=test-branch -F message="my commit message"
I formatted with bold the values you need to replace.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.