<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: open and download few files  from a zip folder through JFrog artifactory http link in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684226#M86993</link>
    <description>&lt;P&gt;If I use the download, will it download the whole zip? I dont want the whole zip file because it is huge. I want to open the zip folder and just get the files I wanted.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2023 15:00:25 GMT</pubDate>
    <dc:creator>dadawasozo</dc:creator>
    <dc:date>2023-10-05T15:00:25Z</dc:date>
    <item>
      <title>open and download few files  from a zip folder through JFrog artifactory http link</title>
      <link>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/683976#M86969</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to read few files from zip folder through JFrog artifactory http link. I 'm not quite sure how I can solve the issue below:&lt;BR /&gt;1) user and password needed when access the link&lt;/P&gt;&lt;P&gt;2) the script I used could have issue that it gave me error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The link I try to access looks like below ( created a fake one to show how it looks like )&lt;BR /&gt;&lt;A href="http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip" target="_blank"&gt;http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;below is a draft of script I put together but it doesnt work. I was told I can create API key that can be used to bypass the user and password for sign in but not able to make it work. Can someone help me out here?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;request = 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 &amp;lt;&amp;lt; Send;

za=open(zip,"zip");
zipfiles=za&amp;lt;&amp;lt;dir;
for (l=1, l&amp;lt;=N Items(zipfiles), l++,
If (
	zipfiles[l]== "somelog.log" ,
	text=za&amp;lt;&amp;lt;read(zipfiles[l]);
	save text file(path1|| todaydate || "log1",text)
	)
	)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 03:40:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/683976#M86969</guid>
      <dc:creator>dadawasozo</dc:creator>
      <dc:date>2023-10-05T03:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: open and download few files  from a zip folder through JFrog artifactory http link</title>
      <link>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684133#M86981</link>
      <description>&lt;P&gt;&lt;LI-MESSAGE title="YouTube API" uid="400049" url="https://community.jmp.com/t5/Uncharted/YouTube-API/m-p/400049#U400049" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp; shows one way an api key might work. Did the documentation they supplied tell you how to supply the one you received?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 11:28:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684133#M86981</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-10-05T11:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: open and download few files  from a zip folder through JFrog artifactory http link</title>
      <link>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684168#M86986</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To deploy the file using &lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;API Key&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;in a header, you would use the following command:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class=""&gt;&lt;CODE&gt;curl -H "X-JFrog-Art-Api:ABcdEF" -X PUT "http://localhost:8081/artifactory/my-repository/my/new/artifact/directory/file.txt" -T Desktop/myNewFile.txt&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 14:07:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684168#M86986</guid>
      <dc:creator>dadawasozo</dc:creator>
      <dc:date>2023-10-05T14:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: open and download few files  from a zip folder through JFrog artifactory http link</title>
      <link>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684169#M86987</link>
      <description>&lt;P&gt;Craige,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Can we still using the open() to open zip folder and download specific file through webpage?&lt;BR /&gt;2) Can we open and read one of the file in the zip folder through page and get only some text out of it?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 14:13:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684169#M86987</guid>
      <dc:creator>dadawasozo</dc:creator>
      <dc:date>2023-10-05T14:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: open and download few files  from a zip folder through JFrog artifactory http link</title>
      <link>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684184#M86989</link>
      <description>&lt;P&gt;Curl's &lt;EM&gt;&lt;STRONG&gt;-H&lt;/STRONG&gt;&lt;/EM&gt; specifies a header, which requires you to use &lt;EM&gt;New HTTP Request&lt;/EM&gt;. open() can add a query string but can't add headers, so it won't do what you need.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="help-&amp;gt;scripting index" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/57242i8F2A008F2138F616/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture.png" alt="help-&amp;gt;scripting index" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;help-&amp;gt;scripting index&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I think you'll need&lt;/P&gt;
&lt;PRE class=""&gt;&lt;CODE&gt;headers({"X-JFrog-Art-Api:ABcdEF"})&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but not the query string and fields.&lt;/P&gt;
&lt;P&gt;Once you get the zip file, you can use JMP's zip archive support to get the unzipped members.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might use download rather than send:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="download a file" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/57246i7DC5CE5B11E55FCA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.PNG" alt="download a file" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;download a file&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5036"&gt;@bryan_boone&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 14:32:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684184#M86989</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-10-05T14:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: open and download few files  from a zip folder through JFrog artifactory http link</title>
      <link>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684198#M86990</link>
      <description>&lt;P&gt;Also, your example is a PUT, not a GET. You probably picked up the PUT example from part of the doc that puts new data into the database. There is probably a GET example for getting old data from the database. GET and PUT are part of the way a REST-ful server works, and there are other verbs too.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 15:20:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684198#M86990</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-10-05T15:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: open and download few files  from a zip folder through JFrog artifactory http link</title>
      <link>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684226#M86993</link>
      <description>&lt;P&gt;If I use the download, will it download the whole zip? I dont want the whole zip file because it is huge. I want to open the zip folder and just get the files I wanted.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 15:00:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684226#M86993</guid>
      <dc:creator>dadawasozo</dc:creator>
      <dc:date>2023-10-05T15:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: open and download few files  from a zip folder through JFrog artifactory http link</title>
      <link>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684244#M86997</link>
      <description>&lt;P&gt;Yes, it downloads the whole zip file, not a member. Unless the API has a method to get the smaller chunk, you'll need to get it all and only unzip what you need. Many APIs allow for what you are trying to do by making a custom zip file of just the items you want. You might have to do some reading in the API doc to puzzle it out.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 15:12:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684244#M86997</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-10-05T15:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: open and download few files  from a zip folder through JFrog artifactory http link</title>
      <link>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684350#M87008</link>
      <description>&lt;P&gt;not success. I found that there are 2 options for using api key for authentication and download file from artifactory:&lt;BR /&gt;1)&amp;nbsp;curl -uadmin:API-Key -ocommons-collections-3.1.jar &lt;A href="http://localhost:8081/artifactory/jcenter/apache-collections/commons-collections/3.1/commons-collections-3.1.jar" target="_blank"&gt;http://localhost:8081/artifactory/jcenter/apache-collections/commons-collections/3.1/commons-collections-3.1.jar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2)&amp;nbsp;curl -H "X-JFrog-Art-Api: API-Key" -ocommons-collections-3.1.jar &lt;A href="http://localhost:8081/artifactory/jcenter/apache-collections/commons-collections/3.1/commons-collections-3.1.jar" target="_blank"&gt;http://localhost:8081/artifactory/jcenter/apache-collections/commons-collections/3.1/commons-collections-3.1.jar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the 2) in script below because of the use of header, but it didnt download the file, but some strange character which I posted at below. I 'm not sure where it went wrong.&amp;nbsp;&lt;/P&gt;&lt;P&gt;temp.log file with information below instead of the content from the url&lt;BR /&gt;&amp;lt;!doctype html&amp;gt;&amp;lt;html lang=en&amp;gt;&amp;lt;head&amp;gt;&amp;lt;meta charset=utf-8&amp;gt;&amp;lt;meta http-equiv=X-UA-Compatible content="IE=edge"&amp;gt;&amp;lt;meta name=viewport content="width=device-width,initial-scale=1"&amp;gt;&amp;lt;meta name=importmap-type content=systemjs-importmap&amp;gt;&amp;lt;link rel=apple-touch-icon sizes=180x180 href=./apple-touch-icon.png&amp;gt;&amp;lt;link rel=icon type=image/png sizes=32x32 href=./favicon-32x32.png&amp;gt;&amp;lt;link rel=icon type=image/png sizes=16x16 href=./favicon-16x16.png&amp;gt;&amp;lt;link rel=mask-icon href=./safari-pinned-tab.svg color=#f5f5f2&amp;gt;&amp;lt;link rel="shortcut icon" href=./favicon.ico&amp;gt;&amp;lt;link rel=stylesheet type=text/css href=/ui/webapp/css/vendorStyles.css&amp;gt;&amp;lt;link rel=stylesheet type=text/css href=/ui/webapp/css/application.css&amp;gt;&amp;lt;script type=systemjs-importmap src=/ui/imports-map/imports.json&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script src=/ui/externals/import-map-overrides/dist/import-map-overrides.js&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script src=/ui/externals/systemjs/dist/s.min.js&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script src=/ui/externals/systemjs/dist/extras/amd.min.js&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script src=/ui/externals/systemjs/dist/extras/named-exports.min.js&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;link rel=preload href=/ui/externals/vue/dist/vue.min.js as=script&amp;gt;&amp;lt;link rel=preload href=/ui/externals/vue-router/dist/vue-router.min.js as=script&amp;gt;&amp;lt;link rel=preload href=/ui/externals/jfrog-ui-essentials/dist/jfrog-ui-essentials.umd.min.js as=script&amp;gt;&amp;lt;link rel=preload href=/ui/externals/single-spa/lib/umd/single-spa.min.js as=script&amp;gt;&amp;lt;base href=/ui/ &amp;gt;&amp;lt;title&amp;gt;JFrog&amp;lt;/title&amp;gt;&amp;lt;style&amp;gt;@keyframes heartbeatOut{from{opacity:1}50%{opacity:0;transform:scale(.8)}to{opacity:0;transform:scale(.8)}}@keyframes heartbeat{from{transform:scale3d(1,1,1)}50%{transform:scale3d(1.15,1.15,1.15)}to{transform:scale3d(1,1,1)}}.pounding-heart-container{display:none;align-items:center;justify-content:center;position:absolute;left:0;right:0;top:0;bottom:0;z-index:9999999999;background:linear-gradient(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 infinite}.logo.zoom-out{animation:heartbeatOut 150ms forwards}&amp;lt;/style&amp;gt;&amp;lt;link href=/ui/css/app.4de23844.css rel=preload as=style&amp;gt;&amp;lt;link href=/ui/css/chunk-vendors.cee239a1.css rel=preload as=style&amp;gt;&amp;lt;link href=/ui/js/app.3b20d340.js rel=preload as=script&amp;gt;&amp;lt;link href=/ui/js/chunk-vendors.61f2dc48.js rel=preload as=script&amp;gt;&amp;lt;link href=/ui/js/preloader.31ea7863.js rel=preload as=script&amp;gt;&amp;lt;link href=/ui/css/chunk-vendors.cee239a1.css rel=stylesheet&amp;gt;&amp;lt;link href=/ui/css/app.4de23844.css rel=stylesheet&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;div class="pounding-heart-container show-splash"&amp;gt;&amp;lt;img class="logo pulse" src=/ui/img/jfrog.8f770bff.svg&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;noscript&amp;gt;&amp;lt;strong&amp;gt;We're sorry but jfrog webapp doesn't work properly without JavaScript enabled. Please enable it to continue.&amp;lt;/strong&amp;gt;&amp;lt;/noscript&amp;gt;&amp;lt;div id=app&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;script src=/ui/js/chunk-vendors.61f2dc48.js&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script src=/ui/js/app.3b20d340.js&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script src=/ui/js/preloader.31ea7863.js&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;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 &amp;lt;&amp;lt; download("D:\temp.log", "replace", "show_progress");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 21:09:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684350#M87008</guid>
      <dc:creator>dadawasozo</dc:creator>
      <dc:date>2023-10-05T21:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: open and download few files  from a zip folder through JFrog artifactory http link</title>
      <link>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684383#M87011</link>
      <description>&lt;P&gt;Hi Craige,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found the issue and get it fixed. The problem is from the URL. replacing "ui/repos/tree/General" with "artifactory" and then I able to download the whole zip file, not the specific file.&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 22:24:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-and-download-few-files-from-a-zip-folder-through-JFrog/m-p/684383#M87011</guid>
      <dc:creator>dadawasozo</dc:creator>
      <dc:date>2023-10-05T22:24:49Z</dc:date>
    </item>
  </channel>
</rss>

