Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

Conversation

Prakhar-Agarwal-byte
Copy link

Added a storage cleaner function demo in Java

Makes progress towards appwrite/appwrite#2031

@Prakhar-Agarwal-byte
Copy link
Author

@eldadfux @Meldiron @PineappleIOnic Please review this PR also 😀

Copy link
Member

@PineappleIOnic PineappleIOnic left a comment

Choose a reason for hiding this comment

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

Could we see a screenshot of the execution working?

@Prakhar-Agarwal-byte
Copy link
Author

@PineappleIOnic Here's the screenshot
storage-cleaner proof

@Prakhar-Agarwal-byte
Copy link
Author

@PineappleIOnic Please merge the PR now 😀

Comment on lines +25 to +26
storage.listFiles(
new Continuation<Object>() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets add pagination, this will only return 25 files.

Choose a reason for hiding this comment

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

In the API docs it's mentioned that it lists all user files. https://appwrite.io/docs/client/storage#storageListFiles

Copy link
Member

Choose a reason for hiding this comment

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

@Prakhar-Agarwal-byte yes that endpoint can be used to list all the files. But you need to use the limit and offsetparameters to get all of them.

Copy link
Member

@christyjacob4 christyjacob4 left a comment

Choose a reason for hiding this comment

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

Please add support for pagination in your cloud function

@christyjacob4
Copy link
Member

@Prakhar-Agarwal-byte closing this PR for now. Feel free to reopen it / create a new one when you're ready to start working on it once again

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
4 participants