JFrog 인공물 http 링크를 통해 zip 폴더에서 몇 가지 파일을 열고 다운로드합니다.안녕,
JFrog 인공물 http 링크를 통해 zip 폴더에서 몇 개의 파일을 읽고 싶습니다. 아래 문제를 어떻게 해결할 수 있는지 잘 모르겠습니다.
1) 링크에 접속할 때 필요한 사용자 및 비밀번호
2) 내가 사용한 스크립트에 오류가 발생하는 문제가 있을 수 있습니다.
내가 액세스하려는 링크는 아래와 같습니다(어떻게 보이는지 보여주기 위해 가짜 링크를 만들었습니다).
http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip
아래는 제가 작성한 스크립트 초안이지만 작동하지 않습니다. 로그인 시 사용자 및 비밀번호를 우회하는 데 사용할 수 있는 API 키를 생성할 수 있지만 이를 작동시킬 수는 없다는 말을 들었습니다. 누군가 나를 도와줄 수 있나요?
</CODE></DIR></PRE><P> </P><P> </P><P> </P><P> </P></LINGO-BODY><LINGO-LABS id="lingo-labs-683976" slang="en-US" mode="NONE"><LINGO-LABEL>자동화 및 스크립팅</LINGO-LABEL><LINGO-LABEL>데이터 접근</LINGO-LABEL></LINGO-LABS><LINGO-SUB id="lingo-sub-684133" slang="en-US" mode="NONE">Re: JFrog 아티팩트 http 링크를 통해 zip 폴더에서 몇 가지 파일을 열고 다운로드합니다.</LINGO-SUB><LINGO-BODY id="lingo-body-684133" slang="en-US" mode="NONE"><P><A href="https://community.jmp.com/t5/Uncharted/YouTube-API/m-p/400049#U400049" class="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa" target="_blank">유튜브 API</A> API 키가 작동할 수 있는 한 가지 방법을 보여줍니다. 그들이 제공한 문서에 귀하가 받은 문서를 제공하는 방법이 나와 있습니까?</P></LINGO-BODY><LINGO-SUB id="lingo-sub-684168" slang="en-US" mode="NONE">Re: JFrog 아티팩트 http 링크를 통해 zip 폴더에서 몇 가지 파일을 열고 다운로드합니다.</LINGO-SUB><LINGO-BODY id="lingo-body-684168" slang="en-US" mode="NONE"><P> </P><P><SPAN>다음을 사용하여 파일을 배포하려면</SPAN><SPAN class=""><STRONG> API 키</STRONG></SPAN><SPAN> 헤더에서는 다음 명령을 사용합니다.</SPAN></P><PRE class=""><CODE>curl -H "X-JFrog-Art-Api:ABcdEF" -X PUT "http://localhost:8081/artifactory/my-repository/my/new/artifact/directory/file.txt" -T Desktop/myNewFile.txtrequest = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip" ),
Method( "GET" ),
);
zip = request << Send;
za=open(zip,"zip");
zipfiles=za<
Re: JFrog 아티팩트 http 링크를 통해 zip 폴더에서 몇 개의 파일을 열고 다운로드합니다.크레이지,
1) 여전히 open()을 사용하여 zip 폴더를 열고 웹페이지를 통해 특정 파일을 다운로드할 수 있습니까?
2) 페이지를 통해 zip 폴더에 있는 파일 중 하나를 열고 읽고 그 중 일부 텍스트만 가져올 수 있습니까?
Re: JFrog 아티팩트 http 링크를 통해 zip 폴더에서 몇 가지 파일을 열고 다운로드합니다.파마 -시간 사용해야 하는 헤더를 지정합니다. 새 HTTP 요청 . open()은 쿼리 문자열을 추가할 수 있지만 헤더를 추가할 수 없으므로 필요한 작업을 수행하지 않습니다.
help->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting index도움말->스크립팅 색인
내 생각에는 당신이 필요할 것 같아요
headers({"X-JFrog-Art-Api:ABcdEF"})
그러나 쿼리 문자열과 필드는 아닙니다.
zip 파일을 얻은 후에는 JMP의 zip 아카이브 지원을 사용하여 압축이 풀린 멤버를 얻을 수 있습니다.
보내는 대신 다운로드를 사용할 수 있습니다.
download a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a file파일을 다운로드하다
@bryan_boone
Re: JFrog 아티팩트 http 링크를 통해 zip 폴더에서 몇 가지 파일을 열고 다운로드합니다.다운로드를 사용하면 전체 zip이 다운로드됩니까? 크기가 크기 때문에 전체 zip 파일을 원하지 않습니다. zip 폴더를 열고 원하는 파일을 가져오고 싶습니다.
Re: JFrog 아티팩트 http 링크를 통해 zip 폴더에서 몇 가지 파일을 열고 다운로드합니다.예, 회원이 아닌 전체 zip 파일을 다운로드합니다. API에 더 작은 청크를 가져오는 방법이 없으면 모두 가져와서 필요한 부분만 압축을 풀어야 합니다. 많은 API에서는 원하는 항목만 사용자 정의 zip 파일로 만들어 수행하려는 작업을 허용합니다. 문제를 해결하려면 API 문서를 좀 읽어야 할 수도 있습니다.
Re: JFrog 아티팩트 http 링크를 통해 zip 폴더에서 몇 가지 파일을 열고 다운로드합니다.또한 귀하의 예는 GET이 아닌 PUT입니다. 아마도 새 데이터를 데이터베이스에 넣는 문서의 일부에서 PUT 예제를 선택했을 것입니다. 데이터베이스에서 오래된 데이터를 가져오는 GET 예제가 있을 수 있습니다. GET 및 PUT은 REST-ful 서버가 작동하는 방식의 일부이며 다른 동사도 있습니다.
<script src="
https://community.jmp.com/ui/js/chunk-vendors.61f2dc48.js">
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");
<script src="
https://community.jmp.com/ui/js/chunk-vendors.61f2dc48.js">
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");
<script src="
https://community.jmp.com/ui/js/chunk-vendors.61f2dc48.js">
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");
<script src="
https://community.jmp.com/ui/js/chunk-vendors.61f2dc48.js">
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");
<script src="
https://community.jmp.com/ui/js/chunk-vendors.61f2dc48.js">
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");
<script src="
https://community.jmp.com/ui/js/chunk-vendors.61f2dc48.js">
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");
Re: JFrog 아티팩트 http 링크를 통해 zip 폴더에서 몇 개의 파일을 열고 다운로드합니다.성공이 아닙니다. 인증을 위해 API 키를 사용하고 아티팩트에서 파일을 다운로드하는 데는 두 가지 옵션이 있음을 발견했습니다.
1) 컬 -uadmin:API-Key -ocommons-collections-3.1.jar http://localhost:8081/artifactory/jcenter/apache-collections/commons-collections/3.1/commons-collections-3.1.jar
2) 컬 -H "X-JFrog-Art-Api: API-Key" -ocommons-collections-3.1.jar http://localhost:8081/artifactory/jcenter/apache-collections/commons-collections/3.1/commons-collections-3.1.jar
헤더 사용으로 인해 아래 스크립트에서 2)를 시도했지만 파일을 다운로드하지 못했지만 아래에 게시한 이상한 문자가 있습니다. 어디서 문제가 발생했는지 잘 모르겠습니다.
URL의 콘텐츠 대신 아래 정보가 포함된 temp.log 파일
<meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content=""IE=edge"" /><meta name="viewport" content=""width" /><meta name="importmap-type" content="systemjs-importmap" />< link rel=icon type=이미지/png 크기=32x32 href=./favicon-32x32.png><script type="systemjs-importmap" src="https://community.jmp.com/ui/imports-map/imports.json"> JFrog@keyframes heartbeatOut {from{opacity:1}50%{opacity:0;transform:scale(.8)}to{opacity:0;transform:scale(.8)}}@keyframes 하트비트{from{transform:scale3d(1,1 ,1)}50%{transform:scale3d(1.15,1.15,1.15)}에서{transform:scale3d(1,1,1)}}.pounding-heart-container{display:none;align-items:center;justify -내용:중심;위치:절대;왼쪽:0;오른쪽:0;상단:0;하단:0;z-색인:9999999999;배경:선형 그라데이션(132.49deg,#414857 14.17%,#252831 83.36%) }.pounding-heart-container.show-splash{display:flex}.logo{width:130px;-webkit-backface-visibility:hidden;-ms-transform:translateZ(0);-webkit-transform:translateZ(0 );transform:translateZ(0)}.logo.pulse{animation:heartbeat 1.7s 무한}.logo.zoom-out{animation:heartbeatOut 150ms 앞으로}

<script src="
https://community.jmp.com/ui/js/chunk-vendors.61f2dc48.js">
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");
Re: JFrog 아티팩트 http 링크를 통해 zip 폴더에서 몇 가지 파일을 열고 다운로드합니다.안녕하세요 크레이지,
문제를 발견하고 해결했습니다. 문제는 URL에서 발생합니다. "ui/repos/tree/General"을 "artifactory"로 바꾸면 특정 파일이 아닌 전체 zip 파일을 다운로드할 수 있습니다.
당신의 도움을 주셔서 감사합니다