Skip to content
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

feat: add custom unique filename when download as zip #312

Merged

Conversation

lassecapel
Copy link

@lassecapel lassecapel commented Nov 17, 2024

Description

This pull request introduces a new functionality that enhances the user experience when downloading ZIP files. When a user clicks the "Download ZIP" button, a prompt is displayed to allow the user to edit the filename before proceeding with the download. By default, the filename is pre-filled with a unique project name that includes a hash, ensuring uniqueness.

Key Features

Pre-filled Default Filename:

  • The filename includes a unique project name (e.g., ProjectName-.zip).
  • The hash is generated to ensure the file name remains distinct for each project.

afbeelding

@wonderwhy-er
Copy link
Collaborator

I am not sure I like that prompt part, person can rename later, I don't want to confirm saving file each time.

@wonderwhy-er wonderwhy-er self-assigned this Nov 20, 2024
@lassecapel
Copy link
Author

lassecapel commented Nov 20, 2024

@wonderwhy-er I'm happy to adjust the functionality to always have a more descriptive filename without a prompt if that fits better within the application.

Edit: updated the code to always use the project description as filename with a unique hash attached

@lassecapel lassecapel force-pushed the feat-add-custom-project-name branch from 3939e8c to 8978ed0 Compare November 20, 2024 09:03
@wonderwhy-er
Copy link
Collaborator

Tested, looks and works good

@dustinwloring1988
Copy link
Collaborator

worked good for me, love the auto naming update

@coleam00 coleam00 merged commit 88479fe into stackblitz-labs:main Dec 1, 2024
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.

4 participants