Skip to content

`text` encoding in Repository Files API doesn't work

Summary

The GitLab Repository Files API to create a new file apparently supports an encoding parameter for the file content to upload. However, base64 seems to be the only encoding which is actually not resulting in a 400 BAD REQUEST response.

Steps to reproduce

Use the curl command straight out of the docs with an encoding=text parameter.

Example Project

any, doesn't matter

What is the current bug behavior?

as stated in the summary.

What is the expected correct behavior?

The file with the given content is created in the repository.

Edited by See GitLab account @timofurrer