DisboxApp / web

Use Discord as a file storage service.
https://disboxapp.github.io/web/
GNU Affero General Public License v3.0
470 stars 87 forks source link

500MB Nitro? #50

Closed Faviogames closed 7 months ago

Faviogames commented 1 year ago

Can be possible to add a feature to enable/mark a file size chunk of 500mb instead for nitro users. Ofc there is not any advantage of doing so but this will mean less files posted on the server hahaa, im plaining to upload big files of 20gb average

SpaceSaver commented 1 year ago

I could be wrong, but I believe that the issue here is not "Your files are too powerful," but instead Discord setting a size limit on the Webhook request size. This is why it splits into 25MB chunks instead of the usual Discord 8MB.

Cattn commented 1 year ago

They recently raised the normal file size limit to 25MB so I'm not sure

SpaceSaver commented 1 year ago

They recently raised the normal file size limit to 25MB so I'm not sure

Well I goofed. Doing some experimentation, will get back to you if I don't forget.

SpaceSaver commented 1 year ago

I've discovered that the form body can't exceed 26214400 bytes in a normal server.

SpaceSaver commented 1 year ago

Another tidbit, you can add up to 10 attachments using follow up PATCH requests. The total size of the attachments in a message no longer need to be less than the limit (or they never did).

SpaceSaver commented 1 year ago

The only problem with this is that the PATCH requests need to include the attachment info from the message or the previous attachments get removed. This data brings us closer to the 25MiB request size limit.

SpaceSaver commented 1 year ago

Also, the "payload_json" form data section is not required and cuts into the 25 MiB.

SpaceSaver commented 1 year ago

The only problem with this is that the PATCH requests need to include the attachment info from the message or the previous attachments get removed. This data brings us closer to the 25MiB request size limit.

Actually, this is a lie. If you don't specify the attachment key in the json_payload, then just patching with the file, it appends instead of replacing. Also, you can patch without a filename getting you more bytes, but Discord will generate a random one and you would need to use attachment ids rather than message ids, which is less secure as the only thing that would need to be guessed would be the file name to steal ur stuff.

Philhubk98 commented 10 months ago

Take my advice and here is something you all need to know. Discord is going to limit sharing downloads next year! So whats the point with sharing downloads on Discord in the first place? better hope someone should take the source code out of Discord and make ourselves a real better alternative so we could stop using this overrated chatting app garbage but in the meantime while this is still the only chatting app thats easier to use for just communicating with friends but Im not sure about sending images or links to my dropbox anymore directly unless sending links from other sites don't affect Discord's very foolish download system?

Cattn commented 10 months ago

Bro what lol they are just putting time limits on links, but if you download through the client it doesn't matter, so if you're using the feature as intended it's fine. It unfortunately may impact this project

SpaceSaver commented 10 months ago

Take my advice and here is something you all need to know. Discord is going to limit sharing downloads next year! So whats the point with sharing downloads on Discord in the first place? better hope someone should take the source code out of Discord and make ourselves a real better alternative so we could stop using this overrated chatting app garbage but in the meantime while this is still the only chatting app thats easier to use for just communicating with friends but Im not sure about sending images or links to my dropbox anymore directly unless sending links from other sites don't affect Discord's very foolish download system?

Link? Or are you referencing the inclusion of keys in the search parameters when you download from the client?

Cattn commented 10 months ago

Take my advice and here is something you all need to know. Discord is going to limit sharing downloads next year! So whats the point with sharing downloads on Discord in the first place? better hope someone should take the source code out of Discord and make ourselves a real better alternative so we could stop using this overrated chatting app garbage but in the meantime while this is still the only chatting app thats easier to use for just communicating with friends but Im not sure about sending images or links to my dropbox anymore directly unless sending links from other sites don't affect Discord's very foolish download system?

Link? Or are you referencing the inclusion of keys in the search parameters when you download from the client?

Discord confirmed there will be a time limit on links (through search params I assume) to "prevent malaware distribution" but said that if you download through client it'll regenerate a link if it's been expired

https://www.theverge.com/2023/11/4/23946640/discord-file-links-will-expire-after-a-day-to-fight-malware

SpaceSaver commented 10 months ago

Take my advice and here is something you all need to know. Discord is going to limit sharing downloads next year! So whats the point with sharing downloads on Discord in the first place? better hope someone should take the source code out of Discord and make ourselves a real better alternative so we could stop using this overrated chatting app garbage but in the meantime while this is still the only chatting app thats easier to use for just communicating with friends but Im not sure about sending images or links to my dropbox anymore directly unless sending links from other sites don't affect Discord's very foolish download system?

Link? Or are you referencing the inclusion of keys in the search parameters when you download from the client?

Discord confirmed there will be a time limit on links (through search params I assume) to "prevent malaware distribution" but said that if you download through client it'll regenerate a link if it's been expired

https://www.theverge.com/2023/11/4/23946640/discord-file-links-will-expire-after-a-day-to-fight-malware

I don't believe that will break this as it requests new links via webhooks for every download. It would break their implementation of sharing though.

DisboxApp commented 7 months ago

From prior discussion it seems Nitro still wouldn't increase the size limit for webhooks. Please reopen this if you find conflicting results. As for the expiry tokens, that is handled.