mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2026-02-06 23:42:17 +00:00
Upload files from url #152
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wuniversales on GitHub.
I would like that you could add files from an external url, for example, pass the url of an image, or a video and that it be uploaded to this platform.
Would it be possible to add the function?
Thanks greetings
@bman46 commented on GitHub:
An example of another site doing this is https://0x0.st/. They allow a key called 'url' to be posted in the body as form data and then they handle the upload from that link.
@stefanbenten commented on GitHub:
@wuniversales Could you elaborate more on the use case?
Why would one not share the URL directly?
@bman46 commented on GitHub:
One thing that I would use this for is storing files from urls that have a short amount of time to be accessed. For example, instagram videos have a hash and timestamp in the URL that prevent them from being viewed with that link after a couple hours.
@stefanbenten commented on GitHub:
This might possibly violate rights and is not a good example in my mind.
@paolafrancesca commented on GitHub:
@wuniversales do you mean from the command line or on the web UI?
@paolafrancesca commented on GitHub:
on top of the abuse problem, I see another one here: what content should be upload from the url?
an instagram url with an embedded video should upload html of the page or the video?
the second is out of scope for transfer.sh, the first would make the example improper ;)
uploading directly a remote content, like https://0x0.st/ does, doesn't need an extra feature in transfer.sh itself, for cli:
something like
curl http://example.com/image.jpg -o - | curl -X PUT -d @- https://transfer.sh/image.jpgshould be enough. We can provide the code of a shell function in the README or examples in UIfrom web UI the same could be similarly done directly in the frontend with some javascript, only drawback is that someone hosting a custom frontend should implement the same feature independently. this would favour a support directly in the backend, but I have to think how this can fit with what we have without being an hack
@stefanbenten what do you think about the different options?
@paolafrancesca commented on GitHub:
we should add an example box in the frontend, @stefanbenten
@bman46 commented on GitHub:
Regardless of the specifics, there are situations where uploading from a link would be useful. That also wont stop anyone from just uploading the file from a local copy, anyway.
@stefanbenten commented on GitHub:
I totally agree, it would not stop it. But certainly make it possible to track down who uploaded it in case of an takedown/abuse request.
@stefanbenten commented on GitHub:
I do agree having a shell alias/function for the above command is fine and easiest. In that case, it would still pass the data via the client and check all boxes in my eyes.