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: Export all user Memos as a .zip of Markdown files #2854

Merged
merged 5 commits into from
Jan 30, 2024
Merged

feat: Export all user Memos as a .zip of Markdown files #2854

merged 5 commits into from
Jan 30, 2024

Conversation

nalderto
Copy link
Contributor

This PR adds an "Export Memos" button to the Setting => My Account page. This will download a zip folder, generated by the server, containing all of the user's Memos in Markdown files. The individual memos filenames are named after their creation date in RFC3339 format. This PR is should partially address this #2211 to improve exports with Memos.

I also resolved some memory leaks with downloading images and files in the share dialog.

This is a second attempt after this PR. This time, I am using a gRPC steaming endpoint to download the .zip file.
Screenshot from 2024-01-28 22-16-00

Copy link
Member

@boojack boojack left a comment

Choose a reason for hiding this comment

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

LGTM otherwise

Copy link
Member

@boojack boojack left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

@boojack boojack merged commit 7333733 into usememos:main Jan 30, 2024
@nalderto nalderto deleted the grpc-export branch January 30, 2024 08:45
@nalderto
Copy link
Contributor Author

nalderto commented Feb 5, 2024

@boojack I saw you changed exporting to be unary instead of streaming. The reason I made it streaming in the first place was to support larger file sizes. I believe gRPC only support 4MB payloads by default. If/when resource export support is added, it is likely that the exports zip folders will be larger than 4MB.

@boojack
Copy link
Member

boojack commented Feb 5, 2024

@nalderto Yeah, my commit 1e07b70 is going to solve an issue #2907

I believe gRPC only support 4MB payloads by default.

It looks like it's the maximum size of the request, not the response. grpc/grpc-web#1182, https://github.com/grpc/grpc-go/blob/master/server.go#L388

If there is still a problem, we can adjust the maximum value, or even switch to streaming.

@nalderto
Copy link
Contributor Author

nalderto commented Feb 5, 2024

@boojack Ah, you're right about it just being for requests. Thanks for fixing that!

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.

2 participants