How do I PUT (update) a file using browse of REST api?

Hi @jthomas,

I’m also trying to PUT some files to my repository but something wrong in my cURL request , I couldn’t find that. Please see the Raw file URL of the file I want to PUT

https://bitbucket.org/{userName}/{repositoryName}/raw/36caf07a207f4793ca915447fcece3672f3b9c98/README.md

And here is the cURL request I’m trying

curl -X PUT -u {username}:{password} -F content=@README.md -F message=curl -F branch=master -F sourceCommitId={lastCommitId} https://bitbucket.org/rest/api/1.0/projects/{userName}/repos/{repositoryName}/browse/src/README.md

I’m not sure whether I’m using correct syntax , Please correct me if anything wrong.
I’m confused with the documentations.And I’m stuck on this.

Please help me as soon as possible.

Thanks,
Sanooj M