Skip to content

Cast multipart threshold to integer#11944

Merged
Gargron merged 1 commit intomasterfrom
to_i
Sep 24, 2019
Merged

Cast multipart threshold to integer#11944
Gargron merged 1 commit intomasterfrom
to_i

Conversation

@ykzts
Copy link
Copy Markdown
Member

@ykzts ykzts commented Sep 24, 2019

No description provided.

@ykzts ykzts added the bug Something isn't working label Sep 24, 2019
Copy link
Copy Markdown
Member

@Gargron Gargron left a comment

Choose a reason for hiding this comment

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

A header will be transmitted as string anyway. Perhaps you want the cast on the megabytes object?

@ykzts
Copy link
Copy Markdown
Member Author

ykzts commented Sep 24, 2019

Yes, I thought so. However, this is handled as a number internally by aws-sdk-s3.

Also Numeric#megabytes returns Integer.

https://github.com/rails/rails/blob/v5.2.3/activesupport/lib/active_support/core_ext/numeric/bytes.rb#L30

@Gargron Gargron merged commit b02169f into master Sep 24, 2019
@Gargron Gargron deleted the to_i branch September 24, 2019 15:32
hiyuki2578 pushed a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants