Skip to content

Conversation

@marcominerva
Copy link
Contributor

Motivation and Context (Why the change? What's the scenario?)

See #863 (comment) and the comments below


/// <summary>
/// The maximum allowed size in megabytes for a request body posted to the upload endpoint.
/// The maximum allowed size in bytes for a request body posted to the upload endpoint.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as per conversation, I'd prefer sticking to "megabytes"

{
if (this.MaxUploadSizeMb.HasValue)
{
return Math.Min(10, this.MaxUploadSizeMb.Value) * 1024 * 1024;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the only line that needs fixing, using Math.Max. I'd keep also the min of 10Mb in place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So don't you want to handle scenarios where, for example, I need to limit the upload to 1 MB?

Copy link
Collaborator

@dluc dluc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

@marcominerva
Copy link
Contributor Author

I think that this PR has been superseded by #896, so it can be closed.

@marcominerva marcominerva deleted the max_upload_size_fix branch November 18, 2024 08:35
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

Successfully merging this pull request may close these issues.

2 participants