[x] upload new files; probably should make this a class method, Opium::File.upload, with a convenience method provided on Opium::Model: Opium::Model#upload_file;
[x] delete old files;
[x] convert to and from the parse object JSON syntax; this would allow the following:
class Game
include Opium::Model
field :cover, type: Opium::File
end
g = Game.first
g.cover.url
[x] The generator should be updated to migrate :file to Opium::File
See the REST API documentation for files.
File should, at the very least, be able to:
Opium::File.upload
, with a convenience method provided on Opium::Model:Opium::Model#upload_file
;[x] convert to and from the parse object JSON syntax; this would allow the following:
:file
toOpium::File