-
-
Notifications
You must be signed in to change notification settings - Fork 4
Download project as ZIP in admin/projects #7715
Conversation
packages/server-core/src/media/file-browser/file-browser.class.ts
Outdated
Show resolved
Hide resolved
packages/server-core/src/media/file-browser/file-browser.class.ts
Outdated
Show resolved
Hide resolved
dinomut1
left a comment
There was a problem hiding this 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
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. |
|
We should differentiate between download and update icons |
HexaField
left a comment
There was a problem hiding this 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.
I agree, I can't believe I overlooked this. I am now dropping them into a directory labeled |
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-browserfeathers service. This adds theJSZippackage for zipping the returned URLs and thesave-aspackage as a convenience for downloading.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
QA Steps
List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.