Repository URL to install this package:
Version:
2.23.0 ▾
|
module JPlatform
module Concerns
module FileUpload
extend ActiveSupport::Concern
def encode_file!(params, original_image_key, orginal_filename_key)
_encoded_file = Base64.encode64(File.open(params[original_image_key].tempfile).read)
params[orginal_filename_key] = params[original_image_key].original_filename
params[original_image_key] = CGI::escape(_encoded_file)
end
end
end
end