Sending Binary files via API

TeamCity ships with tcc.jar, this is a supported program by JetBrains that has the ability to send personal builds of binary files. It uses the URL:

/uploadChanges.html?description=<description-text>&commitType=0

 

I am wanting also wanting to send personal builds of binary files to this end point. TeamCity keeps throwing an error 500 Patch file is corrupted in response.

Has anyone else figured out how to send binary files to uploadChanges.html?
Is there any different headers you send with your request?
What format is your diff file?

1
3 comments

Hi,

Did you follow the instructions given in the Direct Patch Upload documentation to generate the patch?

To generate a patch:

In any IntelliJ Platform IDE: select the required local changes in the commit log, click Create Patch in the context menu, and save the patch as a *.diff file.

Via Git: run git diff commit1..commit2 > path/filename.diff.
For example, to save a diff between the last commit and the preceding commit to the patch.diff file in the test directory, run git diff HEAD^ HEAD > ~/test/patch.diff. See other examples in Git documentation.

 

0

Hey Guilherme,

Thank you for having a look at this, I have seen this documentation before however as we do not use Git with TeamCity (We use Perforce). I created the patch by hand in the same unified diff format but the uploadChanges.html address rejected that.

uploadChanges.html seems to take a different patch format. Compared to uploadDiffChanges.html.

0

Please sign in to leave a comment.