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 the file via providing url instead of sending file via form #32

Open
asiniy opened this issue Jul 21, 2016 · 10 comments
Open

Upload the file via providing url instead of sending file via form #32

asiniy opened this issue Jul 21, 2016 · 10 comments
Milestone

Comments

@asiniy
Copy link
Contributor

asiniy commented Jul 21, 2016

Hey!

I found there is no this ability here, and we have to implement it in the future. What do you think?

@keichan34
Copy link
Owner

Sounds good! My only concern is that it could be used to DoS a site by sending a URL with a massive file, but so we'd probably need to make a "maximum URL download size" option for Exfile

@asiniy
Copy link
Contributor Author

asiniy commented Jul 22, 2016

I thought about implementing validate_size() validator, like validate_content_type, which I'm implementing right now

@asiniy
Copy link
Contributor Author

asiniy commented Jul 22, 2016

It's easier to specify file size for each model instead of creating one global value

@keichan34
Copy link
Owner

A validate_size validator would have to run after the file is downloaded from the URL -- my particular concern is that an end user could enter a URL (either maliciously or by accident) to a file that is larger than the available space on the server, for example. The reason there isn't a limit right now is because Plug has its own limit for POST bodies and most reverse proxies do as well.

@asiniy
Copy link
Contributor Author

asiniy commented Jul 22, 2016

@keichan34 hm, you're right here. We already have file limit, isn't it?

@keichan34
Copy link
Owner

I'm not sure I understand. Which file limit?

@keichan34
Copy link
Owner

Oh, I see, yeah. I think we can use that instead of making a new global configuration variable.

@asiniy
Copy link
Contributor Author

asiniy commented Jul 22, 2016

@keichan34 yes, but I still want to implement this feature.

@keichan34
Copy link
Owner

Got it. Thanks! :)

@asiniy
Copy link
Contributor Author

asiniy commented Jul 22, 2016

Mark this issue as milestone?

@keichan34 keichan34 added this to the v0.4 milestone Jul 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants