It uses params[:id] instead of request.fullpath. It should fix #3132.
Attach a file by drag & drop or click to upload