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

Create a route to clear the generated bucket for a project, to free up space. #88

Closed
v79 opened this issue Mar 18, 2024 · 2 comments · Fixed by #93
Closed

Create a route to clear the generated bucket for a project, to free up space. #88

v79 opened this issue Mar 18, 2024 · 2 comments · Fixed by #93
Assignees
Labels
enhancement New feature or request

Comments

@v79
Copy link
Owner

v79 commented Mar 18, 2024

For a given project, remove HTML and image files from generated bucket.

Delete the contents of the "htmlFragments" and "images" folders for the given project domain key.

@v79 v79 added the enhancement New feature or request label Mar 18, 2024
@v79 v79 changed the title Create a route to clear the generated htmlFragments folder, to free up space. Create a route to clear the generated bucket for a project, to free up space. Mar 26, 2024
@v79 v79 self-assigned this Mar 26, 2024
@v79
Copy link
Owner Author

v79 commented Mar 26, 2024

If I delete all the images from the generated bucket, but those images are still existing in the project sources, this will cause problems.
So the clearGeneratedImages function should only remove images which are not declared in metadata.json.

This isn't a problem for htmlFragments, as they will always be rebuild from source during page generation.

v79 added a commit that referenced this issue Mar 26, 2024
… image resolutions. Unit tested but not functionally tested yet.
@v79
Copy link
Owner Author

v79 commented Apr 15, 2024

My S3Service listObjectsDelim function doesn't work as I expected - check https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html#API_ListObjectsV2_ResponseSyntax for details of 'Delimiter'.
Just use listObjects with a better prefix instead?

@v79 v79 linked a pull request Apr 24, 2024 that will close this issue
@v79 v79 closed this as completed in #93 Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant