0sc / activestorage-cloudinary-service

MIT License
60 stars 8 forks source link

Not working with resource type 'auto' for .gltf and .png formats + active storage. #24

Closed bhagwansinghrajput closed 4 years ago

bhagwansinghrajput commented 5 years ago

When I'm to trying upload gtlf format with resource type 'raw' it's working fine but I need to upload images as well. so I'm sending resource_type 'auto'. it's working for images upload but not working for '.gltf' format. Please help.

`# frozen_string_literal: true

require 'active_storage/service/cloudinary_service'

class ActiveStorage::Service::CustomCloudinaryService < ActiveStorage::Service::CloudinaryService def upload(key, io, checksum: nil, **) instrument :upload, key: key, checksum: checksum do Cloudinary::Uploader.upload(io, public_id: key, resource_type: 'auto') end end end`