Download files from custom site files?

Is there a way to download file added to Custom Site Files list? I know that it is possible to send those files directly to client but I need to download it to client just once (and I don’t want to use external site for downloads).

I am surprised no one has responded yet.

You can add a file from a custom site in the prefetch block.

https://help.hcltechsw.com/bigfix/9.2/platform/Platform/Action/c_begin_prefetch_block.html

Or maybe I am misunderstanding your question?

In case I would be using prefetch block then whats the file URL? Is there some standard URL like using the server address so it basically does not differ from method when file is downloaded from the internet (or is it somehow protected and file is not reachable from internet without agent running on the machine)? I was expecting that downloads in custom site would have some special handling and I would just refer to them using eg name or site name.

Don’t use the Custom BES Site to host client downloads - instead use the BES Server/wwwrootbes/Uploads folder (where Software Distribution, OS Deployment, etc. files get uploaded)

Reference them as https://servername:52311/Uploads/mydir/filename.ext

1 Like

Thanks @JasonWalker. Does it mean that it is not possible to refer to custom site files same way as Uploads or you do not recommend this approach?

@PavelD it’s an efficiency thing. Hosting a file in a site propagates it more widely thank using the Uploads folder. It is possible to do it that way, but more expensive than using the wwwrootbes/uploads folder and letting the clients and relays decide where the file needs to end up.

It’s also just not possible, as far as I know, to refer to site-attached files using Custom Site URLs in the same way as one would refer to the Uploads folder.

For instance, even knowing that my custom site “Test” on my root server has a URL of http://BES-Dev-Root:52311/cgi-bin/bfgather.exe/CustomSite_Test, I still can’t navigate directly to a site file.

If I open that Gather URL in a browser, all I get is a reference to the current versions of the Site and the URLs to get to specific site versions:

Now, knowing that I have a few files attached to the site, I can observe that the files I attached without the ‘send to clients’ option, don’t appear in the site content at all.

I do have another file, “testfile.txt”, that I attached with the ‘send to clients’ option, and that one does appear in this list:

So, if I wanted, I expect I could set up a download command based on that URL. The /bfsites/CustomSite_Test_0_506/testfile.txt really does work…

But, it only works for as long as my Site Version 506 remains on the server. The root server only keeps a small number of site versions online - six versions by default, I think - so once I make seven more changes to my Test site, version 506 won’t be on the server anymore to download.

Nevermind that only the files I attached with the ‘Send to Clients’ option are even there and available the web server. And, if I attached those with the “send to clients” option, I don’t need to download it at all - it should already be there, on every client subscribed to the site. I can just read it directly from the client, no download needed:

q: lines of files "testfile.txt" of client folder of site "CustomSite_Test"
A: line 1
A: line 2
A: line 3