Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add resource_type argument for uploading with url

  • Loading branch information...
commit c9d98bd320ca96aa4fd710e2f8b1da212c246a46 1 parent 93cb32a
Jérôme Lipowicz authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/attachinary/orm/base_extension.rb
4 lib/attachinary/orm/base_extension.rb
View
@@ -44,7 +44,7 @@ def attachinary(options)
# ...
# end
define_method :"#{options[:scope]}_url=" do |url|
- send(:"#{options[:scope]}=", Cloudinary::Uploader.upload(url))
+ send(:"#{options[:scope]}=", Cloudinary::Uploader.upload(url, resource_type: "auto"))
end
else
@@ -52,7 +52,7 @@ def attachinary(options)
# ...
# end
define_method :"#{options[:singular]}_urls=" do |urls|
- send(:"#{options[:scope]}=", urls.map { |url| Cloudinary::Uploader.upload(url) })
+ send(:"#{options[:scope]}=", urls.map { |url| Cloudinary::Uploader.upload(url, resource_type: "auto") })
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.