Is it possible to somehow implement it so that after the download a picture immediately appears so that you can immediately edit it with jcrop
var uploadify_script_data = {}; $('#uploadify').uploadify({ uploader : '/assets/uploadify.swf', script : '<%=pictures_path%>', cancelImg : '/images/cancel.png', auto : true, multi : true, removeCompleted : true, scriptData : uploadify_script_data, onComplete : function(event, ID, fileObj, doc, data){ } });
I try this code but it produces 405
def create render json: {image_path: image.file_path} @restaurant = current_user.restaurants.build(restaurant_params) if @restaurant.save flash[:success] = 'Поздравляем! Ваше заведение создано!' redirect_to restaurant_profile_index_path else render 'new' end end def restaurant_params params.require(:restaurant).permit(:image) end