Skip to content

Comments

Feature/download results#78

Merged
rugeli merged 25 commits intomainfrom
feature/download-results
Sep 11, 2025
Merged

Feature/download results#78
rugeli merged 25 commits intomainfrom
feature/download-results

Conversation

@rugeli
Copy link
Contributor

@rugeli rugeli commented Sep 10, 2025

Problem

What is the problem this work solves, including
closes #70

Solution

What I/we did to solve this problem

  • installed JSzip
  • added function in firebase to query outputs_directory from job_status
  • s3 files zipping and downloading
    • use s3 api calls to list all files in the directory
    • extract filenames from s3's xml
    • use jszip to package files into a single downloadable zip
    • enable download button to download from the browser using blob (TODO: look into boto3 s3.download_fileobj)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Steps to Verify:

  1. Go to the preview page, run a job and click download results (the job id is temporally hard coded for testing, will remove it and return the correct files when the backend is ready)

@github-actions
Copy link

github-actions bot commented Sep 10, 2025

PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-09-11 20:01 UTC

@rugeli rugeli marked this pull request as ready for review September 11, 2025 16:24
@rugeli rugeli changed the base branch from main to feature/update-layout September 11, 2025 17:20
@rugeli rugeli requested a review from ascibisz September 11, 2025 18:06
Base automatically changed from feature/update-layout to main September 11, 2025 18:07
src/App.tsx Outdated
return fileNames;
};

const downloadOutputsFromS3 = async (outputsDir: string, jobId: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

it may be good to make a new utils file for this download code? just to keep the App file a little more concise?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good idea! updates:

  • created an aws util file for s3 related functions
  • moved s3 api path to constant file

@rugeli rugeli merged commit 08f1571 into main Sep 11, 2025
2 checks passed
@rugeli rugeli deleted the feature/download-results branch September 11, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Download Results

2 participants