The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

error uploading a new file to bitbucket server repo

Deleted user
September 20, 2022

Hi, im using the Rest bitbucket api to commit a new file to a branch

I can update an exsising file, but when I try to upload a new file (should be supported by same put method)- I get an error that the fileName was deleted. It doesn't recognize the file- but sure it wont. the file isn't exist yet. I want to create it with a commit.

/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/browse/{path:.*}

 

I use sourceCommitId null as written for uploading a new file

 

curl -X PUT -u MyServerUserName:MyServerPass -F content='Test adding a file' -F message='Test adding a file' -F branch='TestBranch' -F sourceCommitId=null myServerUri

 

also tried sourceCommitId=""

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events