I find myself often having to transfer a random files from another person’s device to mine. Existing file sharing solutions aren’t exactly ideal because they either require me to remember a very long URL (file shares), or requiring me to log in on others’ device (cloud). I’m wondering if there’s a program where anyone can upload files, but can only be viewed and downloaded from the server by authenticated users. I understand it’s not wise to accept files from unauthenticated users, but it would be so damn convenient. If there isn’t one, I suppose that would be my next project.

  • fartsparkles@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 days ago

    What’s the context in which you’re needing to share files?

    My first thought is host your own FTP server and send people credentials to log into it with and upload.

    • Object@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      2 days ago

      I am a teaching assistant, and occasionally people ask me why their code isn’t working. I take it to my device so they can continue their work whilst I figure out the issue. I want to minimise the uploading complexity, and the time it takes to upload one.

  • dgdft@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    While I’m sure there’s a pre-canned tool out there for you, if you have basic software experience (which you seem to), this is one of those times where it’s usually most efficient to hack together a dumb CGI script and call it a day.

    This prompt should get you most of the way there, using your llm of choice:

    Write a minimalist cgi script to help upload files to a server. Upon a GET request, serve a light page with a centered form that takes in a file and a submission code. Submission codes will be stored on individual lines of a plaintext file. Adding new codes to this file is out of scope - but the codes will be 8-char hex strings (do validate that submission strings are not empty!). The script should accept the submission as a POST, and save the file to an upload dir if the submission code is valid.

    Vet the output, harden as needed, setup a systemd service to serve with busybox httpd, and optionally reverse-proxy. If you’ve done this sorta thing before, you can probably knock it out in a half hour.

  • CaptainPedantic@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    2 days ago

    There’s PairDrop. It might have what you need. It’s for transferring files rather than uploading and then downloading later. You could get creative with authentication. Maybe put files in an encrypted archive file.