vakabus / gimmedat Goto Github PK
View Code? Open in Web Editor NEWHTTP server for safely receiving files from friends (written in Rust)
HTTP server for safely receiving files from friends (written in Rust)
At the moment, nothing prevents the anyone with a valid link from uploading unlimited number of empty files, which could lead to filesystem metadata space exhaustion. Could be fixed by limiting the number of allowed files.
It is a bit annoying that HTTP proxies pretty much always have a request body size limit, which makes it impossible to upload large files. By default, nginx buffers the entire request (and Caddy probably too), so you want to have a reasonable limit. For nginx, it's probably a good idea to set proxy_buffering off
and remove the size limit (for gimmedat location only).
However, splitting the large files in JS would simplify deployment (and avoid arguments with admins). Also, it would allow us to retry only the failed block, not entire file if the network fails. I can think of two ways of implementing it:
Splitting the file to predefined blocks if it's too large. Then uploading them as individual files, suffixed with -part001
, ...
Alternatively, issue an "edit token" after a successful file upload with very limited validity (few minutes). The token would allow the user to append another block to the file.
curl
.I was thinking of implementing it, but I couldn't decide which way. What do you think?
Adding support for different web UI languages would be nice... Especially Czech.
The upload size limit is checked before uploading any data. Therefore, it is possible to open lot of concurrent connections, let them pass the size check and then upload data over the given limit.
Can be fixed by continuously checking data allowance while uploading...
I think we should give the file .part
extension during upload, and only rename it to it's real name after it's fully uploaded.
Having 4GB mp4 file might suggest I have got the video, but the upload could have failed at some point. I'll probably notice later that the video file is corrupted, but some other awesome formats are valid even when trimmed.
We could also delete files when the connection breaks, but there is certainly some failure mode which will leave the partial file on disk.
Optionally providing a link (e.g. to a web gallery) instead of a list of uploaded files would be useful for integration with other services
I am thinking about integration with other services running on the same host server...
Imagine, we have a web gallery for photos running on the server. It uses a simple directory as its datastore and anything you copy there will be available in the web interface when you load the webpage. (e.g. PiGallery). There is also gimmedat running on that server.
Is there a reasonably general and meaningful way, how to make gimmedat and the gallery work together? I want to be able to tell my friends: "if you upload the files, they will all be visible in the gallery on this link". And ideally, I would like to be able to set it up on my phone.
In other words, the goal would be:
Questions:
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.