use ruby saving api in migrations

+ bugfix upload problem with files that are too small