Skip to content

Firefly-2032: Add Direct Download of Files - #2048

Merged
aventura121 merged 1 commit into
devfrom
FIREFLY-2032-direct-download
Oct 26, 2026
Merged

aventura121 merged 1 commit into
devfrom
FIREFLY-2032-direct-download

Conversation

@aventura121

@aventura121 aventura121 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Firefly-2032: Add direct-download capability to Job Monitor

Description

We add download buttons/functionality to the Job Monitor and the Info icon's Results tabs, including for multiple results (e.g. SPHEREx).

Builds

Firefly: https://firefly-2032-direct-download.irsakubedev.ipac.caltech.edu/firefly

SPHEREx: https://firefly-2032-direct-download.irsakubedev.ipac.caltech.edu/applications/spherex

Approach

Essentially, we add a new streaming API to Firefly, passing the data along to the browser. (For due diligence, I had Claude double check if any third party / standard Java libraries offered what we wanted out of the box or with less complication. Where we landed in this pull request is the most straightforward and suitable). We also add a read timeout to the remote request. If we leave it to 0, a remote that stops sending data without closing the connection would hang the download indefinitely.

Testing/Validation

Unit/integration tests added (integration tests using a simple http server and fakes).

To manually spot check in Firefly, we can create a job and download a file. For example:

  1. From the landing page, select AllWise Cone Search at M101.
  2. Click search.
  3. Navigate to the Job Monitor tab.
  4. Click the new download icon (blue arrow). This should create a download in the browser (visible in the top right of a Chrome window).
  5. If we then select the ⓘ icon, and expand Results, we should see the download button there as well. See screenshots below.
New Download Button in Job Monitor job-monitor
New Download Button in Info -> Results Panel info-results

To see the download buttons added to the Info icon's Results tab for multiple results, in SphereX:

  1. Open the Spectral Image Search tab. Click the example NGC 3256 under the target box, then press Search.
  2. In Results, select the checkboxes on 3 rows. Press Generate Download Script above the table, then Download Script in the Download Options dialog.
  3. When the Information popup opens, it will show 3 download icons.
  4. Open the Job Monitor tab. The row has Type SCRIPT. Its first icon, Show Download Requests, opens the same 3 download icons.
  5. Click ⓘ on the SCRIPT row and expand Results. It should show the 3 download icons here too (this is new).
New Multiple Results Buttons in Info -> Results Panel spherex
Remote server error (404) handled gracefully 404-gracefully

@aventura121 aventura121 self-assigned this Oct 22, 2026
@aventura121 aventura121 added this to the 2026.4 milestone Oct 22, 2026
@aventura121
aventura121 marked this pull request as ready for review October 26, 2026 16:42
@aventura121
aventura121 requested a review from loitly October 26, 2026 16:42

@loitly loitly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good. I noticed that the vertical alignment is slightly off. Could you fix that before merging? Thanks.

Image

@aventura121
aventura121 force-pushed the FIREFLY-2032-direct-download branch from 7f54633 to 00e2f38 Compare October 26, 2026 19:18
@aventura121
aventura121 merged commit 4d8064c into dev Oct 26, 2026
2 checks passed
@aventura121
aventura121 deleted the FIREFLY-2032-direct-download branch October 26, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants