Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Conversation

@AidanCaruso
Copy link
Contributor

@AidanCaruso AidanCaruso commented Mar 9, 2023

Summary

Adds a download project button to the admin/projects. Getting project directories on the file server recursively is done through an extension to the get function of the file-browser feathers service. This adds the JSZip package for zipping the returned URLs and the save-as package as a convenience for downloading.
image

As a side note, testing with the putt club project, zipping takes roughly 15 seconds on my computer after pressing the download button. It might be worthwhile to add an indicator while this is happening.

References

closes #7643

Checklist

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • ensure all checks pass
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewer

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

Copy link
Contributor

@dinomut1 dinomut1 left a comment

Choose a reason for hiding this comment

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

This is recursively downloading every file in the project before zipping. This is going to result in many unnecessary feathers calls and we miss out on compressing network traffic. The project should be zipped serverside and then returned to the client with one feathers call

@AidanCaruso
Copy link
Contributor Author

This is recursively downloading every file in the project before zipping. This is going to result in many unnecessary feathers calls and we miss out on compressing network traffic. The project should be zipped serverside and then returned to the client with one feathers call

Just to make sure I understand correctly, this would require creating a separate specific feathers service that creates a zip from the project's directories and rather than passing every directory to the client we just pass the zip file.

@HexaField
Copy link
Contributor

Just to make sure I understand correctly, this would require creating a separate specific feathers service that creates a zip from the project's directories and rather than passing every directory to the client we just pass the zip file.

Yes.

@HexaField HexaField marked this pull request as draft March 10, 2023 07:16
@speigg
Copy link
Contributor

speigg commented Mar 10, 2023

We should differentiate between download and update icons

@AidanCaruso AidanCaruso marked this pull request as ready for review March 14, 2023 04:01
@speigg speigg enabled auto-merge March 17, 2023 22:36
Copy link
Contributor

@HexaField HexaField left a comment

Choose a reason for hiding this comment

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

Thinking about this a bit more, we should NOT be putting the zip inside the project folder, as this will likely propagate into git repositories, which will also slow pushing/pulling a lot. Let's put it in a ~/temp directory in the storage provider and we can periodically clean it up.

@AidanCaruso
Copy link
Contributor Author

Thinking about this a bit more, we should NOT be putting the zip inside the project folder, as this will likely propagate into git repositories, which will also slow pushing/pulling a lot. Let's put it in a ~/temp directory in the storage provider and we can periodically clean it up.

I agree, I can't believe I overlooked this. I am now dropping them into a directory labeled /temp.

@speigg speigg added this pull request to the merge queue Mar 18, 2023
@speigg speigg merged commit c7420e9 into dev Mar 18, 2023
@speigg speigg deleted the download-project-zip branch March 18, 2023 17:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Download Project Button in Admin Panel

5 participants