Kajabi/s3direct — pull request #5 by bemurphy (2014-06-03 18:16:51+00:00)
Title: enhance upload size limiting

@brentd @codegangsta heads up

Currently an UploadRequest pulls the size limit from singleton config. It should allow max size to be passed on initialize as an option, so different models can have different sizes (i.e. a user avatar should be 1MB max but a video 1GB)

We can use a little magic model-side by declaring an instance method like this:

```ruby
def avatar_max_size
1.megabyte
end
```

We're tending towards avoiding class level dsl because it makes code much simpler to use instance stuff.