Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add resource_type argument for uploading with url

  • Loading branch information...
commit c9d98bd320ca96aa4fd710e2f8b1da212c246a46 1 parent 93cb32a
Jérôme Lipowicz authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 lib/attachinary/orm/base_extension.rb
4 lib/attachinary/orm/base_extension.rb
@@ -44,7 +44,7 @@ def attachinary(options)
44 44 # ...
45 45 # end
46 46 define_method :"#{options[:scope]}_url=" do |url|
47   - send(:"#{options[:scope]}=", Cloudinary::Uploader.upload(url))
  47 + send(:"#{options[:scope]}=", Cloudinary::Uploader.upload(url, resource_type: "auto"))
48 48 end
49 49
50 50 else
@@ -52,7 +52,7 @@ def attachinary(options)
52 52 # ...
53 53 # end
54 54 define_method :"#{options[:singular]}_urls=" do |urls|
55   - send(:"#{options[:scope]}=", urls.map { |url| Cloudinary::Uploader.upload(url) })
  55 + send(:"#{options[:scope]}=", urls.map { |url| Cloudinary::Uploader.upload(url, resource_type: "auto") })
56 56 end
57 57 end
58 58

0 comments on commit c9d98bd

Please sign in to comment.
Something went wrong with that request. Please try again.