Skip to content
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

An issue (maybe?) with FileUploader #102

Open
igor-alexandrov opened this issue Jul 26, 2021 · 0 comments
Open

An issue (maybe?) with FileUploader #102

igor-alexandrov opened this issue Jul 26, 2021 · 0 comments

Comments

@igor-alexandrov
Copy link

Hey! I got a problem with Shrine (https://github.com/jetrockets/shrine.cr). In some cases (one of our applications that worked with 0.35 before and new Shrine specs), we are getting an error that is below. Maybe it is not really problem of FileUploader, but for sure not all subclasses of IO respond to size.

Do you have any ideas how this can be solved?

In src/shrine/storage/s3.cr:57:18

 57 | uploader.upload(bucket, object_key(id), io, options)
               ^-----
Error: instantiating 'Awscr::S3::FileUploader#upload(String, String, IO+, Hash(String, String))'


In lib/awscr-s3/src/awscr-s3/file_uploader.cr:32:13

 32 | if io.size < UPLOAD_THRESHOLD
            ^---
Error: undefined method 'size' for IO::ARGF (compile-time type is IO+)
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