jfrog-client-go icon indicating copy to clipboard operation
jfrog-client-go copied to clipboard

Does ContentReader of DownloadFileswithsummary have file information in Bytes

Open I559856 opened this issue 2 years ago • 5 comments

Is there any way to get file in bytes from Downloadwithsummary ? I see contentReader returns only returns URI's in datachannels .

I559856 avatar Feb 10 '23 06:02 I559856

Hi team, is there any update on this issue ?

I559856 avatar Feb 14 '23 06:02 I559856

Hello @I559856. Following this documentation, you can get the file path, read it, and get the file data as bytes. If this does not help you, please share more information about your end goal.

Or-Geva avatar Feb 14 '23 08:02 Or-Geva

We wanted to avoid additional IO operation. Jfrog Rest API returns byte stream similarly I wanted to know if content reader returns any bytes directly.

I559856 avatar Feb 14 '23 09:02 I559856

Got it @I559856 , the current API does not support streams, would you like to contribute code to jfrog-client-go? To get started, here is an example of a similar API that returns a stream of the file content (without a summary).

Or-Geva avatar Feb 14 '23 14:02 Or-Geva

Yes , I would love to, I am going through the code will shortly raise an PR

I559856 avatar Feb 21 '23 06:02 I559856