Skip to content

Admin package upload size text control should use MB instead of bytes #2471

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

Closed
theacodes opened this issue Oct 6, 2017 · 1 comment
Closed
Assignees

Comments

@theacodes
Copy link
Contributor

theacodes commented Oct 6, 2017

Context: #2470 (comment)

Decision:

The input in should be in MB and should just be converted to/from bytes in the backend.

Also:

It also might be a good idea to flash an error and redirect back to the detail page if you try to set a limit less then the current default minimum.

Additionally:

[The form field] would be a bit nicer as <input type="number" min={{ THE MINMUM SIZE }} ...> instead of as a text field. It might also make sense to include step="10" or something

@theacodes
Copy link
Contributor Author

@dstufft I'm a PyPA member but not a member on this project so I can't assign myself.

theacodes pushed a commit to theacodes/warehouse that referenced this issue Oct 6, 2017
* Uses a number field instead of a text field.
* The text field now uses megabytes instead of bytes.
* The detail page now shows the value in megabytes as well as the full value in bytes.
* The detail page now shows "Default" as well as indicating what the default limit is in MB instead of just displaying "None".

Unfortunately, I couldn't use "step" in the form field as it would have limited the input to multiples of the step value.

Fixes pypi#2471
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

1 participant