Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload files from url #411

Open
wuniversales opened this issue Sep 15, 2021 · 10 comments
Open

Upload files from url #411

wuniversales opened this issue Sep 15, 2021 · 10 comments

Comments

@wuniversales
Copy link

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

@aspacca
Copy link
Collaborator

aspacca commented Sep 30, 2021

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

@stefanbenten
Copy link
Collaborator

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

@bman46
Copy link

bman46 commented Jan 21, 2022

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
Copy link

bman46 commented Jan 21, 2022

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
Copy link
Collaborator

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.

@bman46
Copy link

bman46 commented Jan 21, 2022

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
Copy link
Collaborator

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.

@aspacca
Copy link
Collaborator

aspacca commented Jan 21, 2022

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?

@stefanbenten
Copy link
Collaborator

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.

@aspacca
Copy link
Collaborator

aspacca commented Mar 3, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants