Skip to content

Add paste service utility #179

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

Merged
merged 1 commit into from
Jun 10, 2023
Merged

Add paste service utility #179

merged 1 commit into from
Jun 10, 2023

Conversation

ChrisLovering
Copy link
Member

@ChrisLovering ChrisLovering commented Jun 4, 2023

Docs:
image

changelog:
image

@netlify
Copy link

netlify bot commented Jun 4, 2023

Deploy Preview for bot-core ready!

Name Link
🔨 Latest commit 5b42e71
🔍 Latest deploy log https://app.netlify.com/sites/bot-core/deploys/6484c45d44d16a00081616a3
😎 Deploy Preview https://deploy-preview-179--bot-core.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ChrisLovering ChrisLovering force-pushed the paste-api branch 2 times, most recently from 801e1e5 to 574f451 Compare June 4, 2023 21:48
Copy link
Member

@mbaruh mbaruh left a comment

Choose a reason for hiding this comment

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

A couple of things that might make sense to have but aren't blockers:

  • Enable the "Use a longer URI" option, although I don't see it in the API docs.
  • Return the deletion URL. This would allow us to cache it and potentially use it via a command if we find that a paste contains sensitive information.

@ChrisLovering
Copy link
Member Author

Enable the "Use a longer URI" option, although I don't see it in the API docs.
Return the deletion URL. This would allow us to cache it and potentially use it via a command if we find that a paste contains sensitive information.

I like both of these, added in a force push.

http_session (aiohttp.ClientSession): The session to use when POSTing the content to the paste service.
file_name: The name of the file to save to the paste service.
lexer: The lexer to save the content with.
max_size: The maximum number of bytes to be allowed. Anything larger that 256kB will be rejected.
Copy link
Member

Choose a reason for hiding this comment

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

This needs to be updated.

Suggested change
max_size: The maximum number of bytes to be allowed. Anything larger that 256kB will be rejected.
max_size: The maximum number of bytes to be allowed. Anything larger that 128kB will be rejected.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated in the forcepush to reference the constant instead. Looks like this now

image

image

Copy link
Member

@vivekashok1221 vivekashok1221 left a comment

Choose a reason for hiding this comment

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

LGTM 🌟.

@vivekashok1221
Copy link
Member

Good ol' reliable Chris.

@ChrisLovering ChrisLovering merged commit 5ee9489 into main Jun 10, 2023
@ChrisLovering ChrisLovering deleted the paste-api branch June 10, 2023 18:44
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.

3 participants