ruby - rails carrierwave with cloudinary return null imageurl post -
iam using gem cloudinary carrierwave uploading. method post worked got return null on image path url after uploading image
this create method
def create @multi_images = array.new image_params[:imagepath_data].each.with_index |file, index| @single_image = image.new(:path => file, :user_id => curent_user.id) if @single_image.save @multi_images.push(@single_image) if image_params[:imagepath_data].length == index+1 render json: @multi_images, httpstatus: postsuccess break end else render json: {message: "some file can't saved!", status: postfailed} break end end end
can solve :(
Comments
Post a Comment