Hi, i am using curl to upload file
echo "${FILE}" | curl "${CLOUD_API_ADDRESS}/repositories/${ORG_NAME}/${REPO_NAME}/src/?branch=${FEATURE_BRANCH}" \ --user myname:mypassword \ -F /src/test.json=@-
According to documentation there is an ability to pass query params, but still my file is uploading to main branch. https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/src
If i am using application/x-www-form-urlencoded everything is fine with query parameters, but i cant pass file in this way.
How can i upload file and specify query parameters? (branch, message etc.)
Finally i found a solution. You should pass "query" params as form values. For example,
-F "branch=feature/branch"
Atlassian team, please update docs, it is not query params, it was very confused.
++++++1 for updating the docs please
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
also thanks @maxym for going through that struggle
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.