Upload files from url #152

Open
opened 2026-01-19 18:29:12 +00:00 by michael · 10 comments
Owner

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

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
michael added the hacktoberfest label 2026-01-19 18:29:12 +00:00
Author
Owner

@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.

@bman46 commented on GitHub: An example of another site doing this is [https://0x0.st/](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.
Author
Owner

@stefanbenten commented on GitHub:

@wuniversales Could you elaborate more on the use case?
Why would one not share the URL directly?

@stefanbenten commented on GitHub: @wuniversales Could you elaborate more on the use case? Why would one not share the URL directly?
Author
Owner

@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.

@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.
Author
Owner

@stefanbenten 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.

This might possibly violate rights and is not a good example in my mind.

@stefanbenten 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. This might possibly violate rights and is not a good example in my mind.
Author
Owner

@paolafrancesca commented on GitHub:

@wuniversales do you mean from the command line or on the web UI?

@paolafrancesca commented on GitHub: @wuniversales do you mean from the command line or on the web UI?
Author
Owner

@paolafrancesca 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.

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.jpg should be enough. We can provide the code of a shell function in the README or examples in UI

from 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: > 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. 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.jpg` should be enough. We can provide the code of a shell function in the README or examples in UI from 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?
Author
Owner

@paolafrancesca commented on GitHub:

we should add an example box in the frontend, @stefanbenten

@paolafrancesca commented on GitHub: we should add an example box in the frontend, @stefanbenten
Author
Owner

@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.

@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.
Author
Owner

@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 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.
Author
Owner

@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.

@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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#152