Is the equality reversed in the filename comparison? i.e. perhaps this line should really be:

```
return [HTTP::CONFLICT, nil] if sha1 == buildpack.key && uploaded_filename != buildpack.filename
```

The `upload` action is getting a little difficult to follow as it accumulates behavior. Perhaps it might be made clearer by extracting portions of it, like this expression, into separate methods or even into another class that has its own unit tests?