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

pdf is created but how to save into aws not in local #98

Open
ritikjs opened this issue Nov 1, 2022 · 2 comments
Open

pdf is created but how to save into aws not in local #98

ritikjs opened this issue Nov 1, 2022 · 2 comments

Comments

@ritikjs
Copy link

ritikjs commented Nov 1, 2022

i am not able to save pdf o s3 bucket

@SamipanB
Copy link

SamipanB commented Jun 1, 2023

      const generated = await pdf.create(document, options);
      const fileName = "output.pdf";

      const params = {
        Bucket: process.env.BUCKET_NAME,
        Key: fileName,
        Body: generated,
      };

      const data = await s3.upload(params).promise();

This should do the work

@martinGM05
Copy link

Can you show what you have in the document? @SamipanB

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

No branches or pull requests

3 participants