Shrine

Upload a file with derivatives without an attachment

Hello,

Is it possible to upload a file and create the derivatives for the file without an attachment?

Basically by just using the uploader.

We used to do that with the versions and processing plugins like that:

uploader = PortfolioUploader.new(:store)
file = params[:file]
uploaded = uploader.upload(file, action: :resize_and_upload)
render json: uploaded

PortfolioUploader :

process(:resize_and_upload) do |io, _context|
(...)
end

Thanks!