Phalcode / gamevault-backend

Backend for the self-hosted gaming platform for drm-free games
https://gamevau.lt
Other
155 stars 13 forks source link

Uploading Games #282

Open KawaKode opened 2 months ago

KawaKode commented 2 months ago

The issue and how this feature would improve on that It would be cool if we could upload games directly from the client. We could associate the files with games from the Db providers directly and it would just make thing easier as right now, since I'm using a VPS, I have to transfer games via SFTP, which can be a pain because sometimes it disconnects in the middle of a transfer.

Alternatives I've considered

It's not very urgent, but it would be a nice feature I think :) Thanks for your consideration !

Alfagun74 commented 2 months ago

Hi there,

Thanks for sharing your thoughts on this feature request. We've actually discussed something similar before here.

I'm definitely open to considering this feature request.

Speaking more broadly, when it comes to ensuring reliability with uploads, I'd recommend utilizing torrents for transferring your larger files and folders from your client to your server peer-to-peer. Torrents offer checksums and provide a robust mechanism for file transfer. (It's worth noting that torrents aren't just useful for piracy; they're valuable for legitimate file sharing purposes as well.)

This thought reminds me of @KairuByte s Comment here: https://github.com/Phalcode/gamevault-backend/issues/14#issuecomment-1646209177

Theoretically we could use Torrents for up and downloads as an additional feature using webtorrents, while still supporting the "normal" way. Lets see.

I will write into this ticket as soon as we have proper plans for implementation.

KairuByte commented 2 months ago

@KawaKode two suggestions in the short term:

  1. Use a better SFTP client. Interrupted uploads shouldn't be a complete wash, and if they are your client is either not configured properly, or your VPS is rejecting continuation methods. Give it a look and I'm sure you can get resumable uploads working.
  2. You can use a different tool, such as rclone, to have the files moved over. You can even automate this so that any file placed in the specified directory is moved over asap. I believe rclone handles partial uploads as well, which would prevent the aforementioned issue.
KawaKode commented 2 months ago

Thanks for the suggestions, but the alternative for me is to mount my B2 bucket (B2 is an equivalent to Amazons S3 but cheaper, and I use that as my storage system) on my machine, it works well enough for me :)

KairuByte commented 2 months ago

Take a look at this if you aren't using it already: https://github.com/KairuByte/GV-CF-B2-Worker