Skip to content

How to use multipart instead of base64 uploading?

Maicol Bentancor edited this page Oct 25, 2017 · 1 revision

You can remove carrierwave-base64 if you don't think you will use base64 uploading in the future, and for the requests that receive the image/file in multipart, you have to skip the Content Type validation, because instead of Application/json, it will be multipart/form-data, so you need to add the next line to your controller:

skip_before_action :check_json_request, only: :my_action