mollersuite / monofile Goto Github PK
View Code? Open in Web Editor NEWFile sharing over the Discord CDN
Home Page: https://fyle.uk
License: The Unlicense
File sharing over the Discord CDN
Home Page: https://fyle.uk
License: The Unlicense
when i try to upload a large file (in my case 500MiB)
i get the following error
HeadersTimeoutError: Headers Timeout Error
at Timeout.onParserTimeout [as _onTimeout] (/var/www/monofile/node_modules/undici/lib/client.js:902:28)
at listOnTimeout (node:internal/timers:575:11)
at process.processTimers (node:internal/timers:514:7) {
code: 'UND_ERR_HEADERS_TIMEOUT'
}
New client (because v1.3's is terrible to work with.)
Plan is to, with this, solve:
I'll convert this to a PR once I publish the client-v2 branch.
A few ideas I want to implement:
Implement API documentation through https://hono.dev/snippets/zod-openapi; maybe do this on another branch after api-v1 is done
just some direct download link (don't host on monofile DON'T HOST ON MONOFILE) in the footer to it
Fucking terrible. We should just get rid of it, honestly...
At least add bulk delete/etc & maybe bans
instead of just one tag
attr, support multiple
Fuck you chloe
Add a maxDiscordMessageFiles option to config.json to allow server hosts to only post one file per message if they feel that it is needed.
Originally posted by @CrazyDev05 in #46 (comment)
https://gitlab.gnome.org/Teams/Design/icon-development-kit
I don't know why I haven't done this already but uhhh.. oops :3c
I'm pretty sure literally anyone can verify monofile on like google search console for themselves rn lmao
If we do #50, we can probably save ourselves from breaking anything by just checking the date at which a file was uploaded
People are kinda used to /:fileId being a direct link, however (or at least I am), so I'm not sure; but for the stuff most people use /:fileId for this is also kind of an improvement?
I'm not sure if we should do this or not so
In the future, potentially:
so, basically: supply a bot token and monofile will do the rest.
Will add to the management panel:
the bot specified by DISCORD_TOKEN should:
new bots will automatically receive the delete messages permission
actions on messages under a webhook or bot that is no longer available should be distributed between all available bots
this is your problem @linkability
https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
Bun has native support for Argon2 https://bun.sh/docs/api/hashing#bun-password idk how node
might be nice for checking if everything works properly. not now; but later, ofc
Add previews for text/
on /download
@Jack5079 Doing this with all of our branches might be weird so idk
Hono's official templates build the server using Vite. We should too.
Benefits include:
import.meta.glob
Password reentry should be required for actions listed under the Account section of the account management menu. In addition, the "I forgot my password" should send an email containing a link to reset an account password, instead of just sending a link which logs the user in.
Should help with Discord rate limits sucking; should mean if someone deletes like 1000 files at once it won't leave any messages up if you reboot in the middle of it
While this isn't part of #12, we should definitely refactor v0 - the code is an absolute piece of shit right now and absolutely needs to be mostly rewritten. Should help if future issues arise from v0 in the future as well.
Add multi-bot/multi-webhook support to pseudo-increase ratelimits (can webhooks read their own messages? I forgot)
For updating old files, this can be done by checking the upload date for the last message
This is mainly for large files, like videos or big archives. As of right now, a user can't tell the upload progress of any file, adding a progress bar would help a user know how close to finished their file is (kinda obvious now that i write this but whatever lol). Not sure how'd implementation would work, but from what i know, checking when each chunk is done uploading, update the progress bar. Something like that lol
Targeting 3.0 for this maybe
Implement OAuth, or, alternatively, an OAuth-like service, for apps to interface with
I don't think we do this yet so I guess that means we have an incomplete range implementation ooopsies :3
README.md sucks ass right now lmfao
I'm too tired to make this proper i need to do homework
Would be nicer than having to go to the instance every time to upload a file
Originally posted by @auuub in #32 (comment)
We. don't use jwts. and we probably should
monofile crashes on a file read error due to such error not being caught. Probably should be fixed
For when you're outside trying to use monofile
Should probably check if the notifications API is available before adding the button or anything, otherwise the page just Dies
Or a sound effect, but nowadays browsers make that a permission too
Stopgap for #7
Things to take into account:
lol
Maybe stream attachments & fetch messages from the API as the download goes on to allow it to start immediately?
Originally posted by @Jack5079 in #17 (comment)
config.json
should be part of .gitignore
, with an example provided in a separate file which can be copied over for easy setup
if we do this, we should also drop dotenv
allow admins to suspend accounts
allow admins to make invites when registration is disabled
Svelte is turning to shit so we will need to find a new framework.
I propose Marko.
npm run build src/server.ts
, and in there something likeimport * as Run from "@marko/run/router" // Run uses Request and Response
import { Hono } from "hono" // So does Hono
app.use("/", (c, next) => Run.fetch(c.req.raw) ?? next()) // i think? I had something before that worked I need to test more
The superior date and time format
hey pls can u make a tutorial for RoControl? :(
I did not know that monofile didn't work without one, but it seems like it; so we should probably work on removing this requirement.
This includes both client and server fixes to only initiate routes which use email when it is required, as well as hiding options related to email when it is disabled.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.