Skip to content

Feature-request: download all sketches as zip #1939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dhowe opened this issue Oct 8, 2021 · 10 comments
Open

Feature-request: download all sketches as zip #1939

dhowe opened this issue Oct 8, 2021 · 10 comments
Assignees
Labels
Feature Request Proposal for adding a new functionality Help Wanted Would love additional input or contributions! Priority:High Should be addressed soon but not critical

Comments

@dhowe
Copy link

dhowe commented Oct 8, 2021

Apologies if this already exists, but would be very useful to be able to bulk download all sketches from the 'My Sketches' page

@catarak
Copy link
Member

catarak commented Oct 8, 2021

Thanks for the suggestion! I thought there was an open issue about this but apparently there is not. A related issue is #273.

@catarak catarak added Help Wanted Would love additional input or contributions! Priority:High Should be addressed soon but not critical Feature Request Proposal for adding a new functionality labels Oct 8, 2021
@dwight9339
Copy link
Contributor

I'd like to take a crack at this if no one else is working on it.

@Suhasshenoy
Copy link

Suhasshenoy commented Oct 14, 2023

I'd like to work on this if no one is currently working on it.

@mhsh312
Copy link
Contributor

mhsh312 commented Dec 3, 2023

So currently the editor uses JSZip to make a zip file of a sketch using this controller:

export function downloadProjectAsZip(req, res) {
Project.findById(req.params.project_id, (err, project) => {
// save project to some path
buildZip(project, req, res);
});
}

The same library can be used for all the current sketches of a user. We can use the getProjects controller that returns an array of all projects of a user, and then iterate through this array to add all the projects in a single zip file.

Similar fix can be done for #273

Please assign either or both of these issues to me. @lindapaiste @raclim

@lindapaiste
Copy link
Collaborator

@mhsh312 We may run into issues here due to the size of the zip. See #643. But let's start with what you are proposing and see how that goes.

@mhsh312
Copy link
Contributor

mhsh312 commented Dec 8, 2023

@mhsh312 We may run into issues here due to the size of the zip. See #643.

Since #643 would be an issue for both individual and multiple sketches, I believe it should be addressed separately.

@Jatin24062005
Copy link
Contributor

@raclim Now these feature exist's In my Opinion It would be better to close these...

@Thomascountz
Copy link

I wrote this bulk-download sketch to do this, but I'd love to see this built into the editor... the sketch I wrote uses an undocumented API (rate limited at 2req/s).

Image Image

@Jatin24062005
Copy link
Contributor

@Thomascountz That sounds like a really useful feature! I'd love to help work on integrating this into the editor Also, are there any constraints or alternative APIs we should consider for handling the rate limits?

@Thomascountz
Copy link

@Jatin24062005 Sounds great!

Oh, by "rate limit," I meant "self-imposed rate limit." I added the constraint when calling the /zip endpoint so as to not make too much noise on the non-public API. 😅

To get things in the editor, I'm thinking we can add a method similar to downloadProjectAsZip to take in multiple project IDs. Then we could update the SketchList and SketchListRowBase components to include some way to select projects, (like a checkbox and props for onSelectSketch and isSelected). Then add a button to make an call to whichever endpoint with JSON.stringify({ project_ids: selectedSketchIds }).

I just got the project spun up locally and will see if it could work like this in the coming days. The docker-compose setup was really nice! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Proposal for adding a new functionality Help Wanted Would love additional input or contributions! Priority:High Should be addressed soon but not critical
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants