简体   繁体   English

我如何通过java代码将单个文件上传到指定项目的指定分支,因为没有合适的api接口

[英]how can i upload a single file to specified branch of specified project by java code , as there is no suitable api interface

Anybody knows the implementation of function of uploading a entire file to a specific branch of a specific project on gitlab UI portal ?有人知道将整个文件上传到 gitlab UI 门户上特定项目的特定分支的功能的实现吗?

I want to upload a single file to specified branch of specified project , but there is no suitable api interface.我想上传单个文件到指定项目的指定分支,但是没有合适的api接口。 I have checked the gitlab api document, and there is "POST /projects/:id/uploads" which help upload a file to a project but not under the branch of the project , and "/projects/:id/repository/files/:filePath" which creates a new file under the specified branch of project but it only support content of file ,not a entire file.我检查了 gitlab api 文档,有"POST /projects/:id/uploads"有助于将文件上传到项目但不在项目分支下,还有"/projects/:id/repository/files/:filePath"在项目的指定分支下创建一个新文件,但它只支持文件的内容,而不是整个文件。 So, these two interfaces cannot solve my problem.所以,这两个接口不能解决我的问题。

Does anyone face the issue ?有人面临这个问题吗? any help will be appreciated!任何帮助将不胜感激!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何调用IDL接口上未指定的方法? [Corba,JAVA] - How can I invoke methods which are not specified on the IDL interface ? [Corba, JAVA] 如何在 java 中使用 AWS S3 API 条件发送文件? 我的错误是:您指定的 Content-MD5 无效 - How can I send a file using AWS S3 API conding in java? My error is: The Content-MD5 you specified is not valid Java代码无法找到或找到指定的文件路径 - Java code can't find or locate specified file path 如何分支到循环的指定部分? - How do I branch into a specified part of a loop? 如何在Java代码中使用Google Maps API来获取指定位置的坐标? - How do I use Google Maps API in a Java code to fetch coordinates of specified location? 如何解决在Java代码中创建具有指定名称的文件时的安全漏洞? - How to solve a security break in creating File with a specified name in Java code? 如何导航到.java文件而不是类路径中指定了sourcepath的.class文件? - How can I navigate to a .java file instead of a .class file with sourcepath specified in the classpath? 如何在Java中读取来自文本文件的指定字符 - How can specified chars from a text file be read in java 未指定类型的Java接口 - Java interface without type specified Java - 如何将文件写入指定的目录 - Java - how do I write a file to a specified directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM