PRX/pop-up-archive — pull request #532 by zealoushacker (2014-07-27 21:45:32+00:00)
Title: [#75359736] Hackish way of always uploading to AWS, instead of IA

@kookster Please take a look at this. We realize that this is a rather hackish way of accomplishing the uploading of files to IA in all cases. The intent behind this is to get that done, and also to very soon write a script to archive files uploaded in this way to IA - for branding purposes, for those users who want that.

After speaking and showing this change-set to @baileyspace, we had some questions.

It looks like there are three definitions of `upload_to` in the app:

app/models/file_storage.rb:34
app/models/item.rb:181
app/models/collection.rb:55

It looks like you had written the latter two, and Lasse had written the first.

Based on the method lookup chain, the first's method would have to be called first from app/controllers/api/v1/audio_files_controller.rb:70 in `upload_to_storage`.

Primarily, I don't quite understand the reasons for why there are three definitions.

Secondarily, I want to make sure that with this pull request, I won't be introducing some breaking side effects, that may surface later as a result of introducing this hack as a temporary solution.

Please let us know.