gitlabr icon indicating copy to clipboard operation
gitlabr copied to clipboard

Unable to push large html files

Open janklasek1 opened this issue 2 years ago • 1 comments

Hello,

I tried this library for the first time yesterday and encoutered a problem while uploading large html files (not sure in terms of size, but i thought it is caused by files having some very long lines of code (50000+ characters), this did even not work for example with the rendered default (sample) Rmd code which is not large, but has an extremely long script tag. I always (or in 90% of cases) got error 520.

I tried the following code to push the file.

gl_push_file( project = 12345678, file_path = "sample.html", content = paste(readLines("sample.html"), collapse="\n"), commit_message = "Upload large html file")

Can you have a look at this issue or recommend another approach to push it using API?

janklasek1 avatar Jun 16 '23 08:06 janklasek1

Hi @janklasek1 ,

I am not sure why html files do not work properly, but it may be protected by the API.

To push files on your repository, I would recommend using git tools directly. For instance with {gert}

gert::git_add("sample.html")
gert::git_commit("Upload large html file")
gert::git_push()

I think this is more appropriate.

statnmap avatar Jun 16 '23 16:06 statnmap

The problem may come from CloudFlare.
This is a problem on the GitLab instance that I can not fix or prevent with 'gitlabr'.
Hence, I'll close this issue.

Maybe you can follow other issues like :

  • https://gitlab.com/gitlab-org/gitlab/-/issues/460765
  • https://gitlab.com/gitlab-com/gl-infra/production-engineering/-/issues/13249

statnmap avatar May 16 '24 13:05 statnmap