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

CodeblocksOverFileUploadsHandler.ts Rework #250

Open
theboxmage opened this issue May 23, 2022 · 7 comments
Open

CodeblocksOverFileUploadsHandler.ts Rework #250

theboxmage opened this issue May 23, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@theboxmage
Copy link
Contributor

What Functionality Are You Suggesting?

Please describe the functionality below:
Reworking of the CodeblocksOverFileUploadsHandler to automatically upload plain text files to a hosting service.

Why Will This Benefit The Community?

For standard text file uploads, the current bot interaction is to delete the file and redirect them to codeblocks or a Github gist. After discussion with the other moderators, this could be improved by determining when a plain text file is uploaded and automatically uploading the file to a pastebin-like service.

This is not a dev ready feature. Ongoing discussion needs to occur about which service to use, as well as rough implementation plan.

@theboxmage theboxmage added the enhancement New feature or request label May 23, 2022
@LamboCreeper
Copy link
Member

I still think this is an interesting and cool idea, not sure on the legality of taking content people uploaded to one service and uploading it to another service without their permission. That's my concern.

@srezzag
Copy link

srezzag commented Nov 20, 2023

Sorry for jumping on this 1 year later --

Why Will This Benefit The Community?
For standard text file uploads, the current bot interaction is to delete the file and redirect them to codeblocks or a Github gist. After discussion with the other moderators, this could be improved by determining when a plain text file is uploaded and automatically uploading the file to a pastebin-like service.

This is not a dev ready feature. Ongoing discussion needs to occur about which service to use, as well as rough implementation plan.

I understand the current and future implementation -- still not sure what the upside is for the community. What is the value-add for hosting .txt files as opposed to using codeblocks?

@LamboCreeper
Copy link
Member

What is the value-add for hosting .txt files as opposed to using codeblocks?

@srezzag If I recall correctly it was for occurrences where a code block would not be big enough to fit the entire piece of code due to Discord's message length rules. I'm not really sure this is needed though, as we don't seem to run into this issue a lot.

By the way, thanks for taking an interest in our open source projects. Please ping me over on our Discord server so I know who you are - it'd be great to chat!

@srezzag
Copy link

srezzag commented Nov 20, 2023

Pinged! 👍

And that makes sense!
Is there perhaps a middle-ground solution, where a user can upload a file and have it be converted to a codeblock upon upload? This helps newer folks who aren't familiar with codeblocks be able to post formatted code by simply dragging and dropping a file to the server and prevents any hosting of files.

But the extent to which it helps with longer-form posts, well it'll still be capped at the maximum character length for a post I would imagine. Unless split-posting is a thing in which multiple posts would be generated to accomodate.

@theboxmage
Copy link
Contributor Author

Given that a discord bot is the medium, it would depend on the functions of the discord bot API. Could it do a code block? Yeah if the file has text below the character count. But this just be over engineering, maybe it's time for the mod team to reconsider just disabling the listener for discords supported file types.

We didn't like the layout before, but it might be worth a conversation.

@LamboCreeper
Copy link
Member

The more I think about this the less I like any implementation, honestly.

I ask myself questions like:

  • What if someone adds malware to a file and we process/upload it?
  • What happens if someone wants their upload removed (GDPR)?
  • What is the effort vs reward?

@theboxmage
Copy link
Contributor Author

  1. Is one of the reasons we don't do file uploads as is.
  2. We'd have to use the discord bot To store user IDs
  3. See my previous comment, if we want this we might just want to go back to square one

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

No branches or pull requests

3 participants