Skip to content

Conversation

@sulphur
Copy link

@sulphur sulphur commented Sep 5, 2022

Hi,
Currently Waffle ( well erlang's :file.write which Elixir's File.write uses) fails to writes files greater than 2GB and as such we can't upload files larger than 2GB. This PR uses stream to write instead.

Copy link
Member

@achempion achempion left a comment

Choose a reason for hiding this comment

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

Good catch 👍 Thank you for the provided fix

body
|> StringIO.open()
|> elem(1)
|> IO.binstream(1024*1024*10)
Copy link
Member

Choose a reason for hiding this comment

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

why this number exactly?

Copy link
Author

@sulphur sulphur Oct 3, 2022

Choose a reason for hiding this comment

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

It is arbitrary. I'm using 10MB chunks to write to files. When to small it can be long when to high it will use to much memory i figured 10Mb is good compromise today. I don't know what would be best here :)

@darwin67
Copy link

@achempion Is this PR expected to be merged soon?

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.

3 participants