Skip to content

Cast multipart threshold to integer - #11944

Merged
Gargron merged 1 commit into
masterfrom
to_i
Sep 24, 2019
Merged

Gargron merged 1 commit into
masterfrom
to_i

Conversation

@ykzts

@ykzts ykzts commented Sep 24, 2019

Copy link
Copy Markdown
Member

No description provided.

@ykzts ykzts added the bug Something isn't working label Sep 24, 2019

@Gargron Gargron left a comment

Copy link
Copy Markdown
Member

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

ykzts commented Sep 24, 2019

Copy link
Copy Markdown
Member Author

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