{"record":{"id":"b2d9c1732e968849","repo":"dianping/cat","slug":"no-url-provided","errorCode":null,"errorMessage":"No URL provided.","messagePattern":"No URL provided\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cat-home/src/main/webapp/assets/js/uncompressed/dropzone.js","lineNumber":595,"sourceCode":"      }\n      if (!(this.element && (this.element.nodeType != null))) {\n        throw new Error(\"Invalid dropzone element.\");\n      }\n      if (this.element.dropzone) {\n        throw new Error(\"Dropzone already attached.\");\n      }\n      Dropzone.instances.push(this);\n      this.element.dropzone = this;\n      elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {};\n      this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {});\n      if (this.options.forceFallback || !Dropzone.isBrowserSupported()) {\n        return this.options.fallback.call(this);\n      }\n      if (this.options.url == null) {\n        this.options.url = this.element.getAttribute(\"action\");\n      }\n      if (!this.options.url) {\n        throw new Error(\"No URL provided.\");\n      }\n      if (this.options.acceptedFiles && this.options.acceptedMimeTypes) {\n        throw new Error(\"You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.\");\n      }\n      if (this.options.acceptedMimeTypes) {\n        this.options.acceptedFiles = this.options.acceptedMimeTypes;\n        delete this.options.acceptedMimeTypes;\n      }\n      this.options.method = this.options.method.toUpperCase();\n      if ((fallback = this.getExistingFallback()) && fallback.parentNode) {\n        fallback.parentNode.removeChild(fallback);\n      }\n      if (this.options.previewsContainer !== false) {\n        if (this.options.previewsContainer) {\n          this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, \"previewsContainer\");\n        } else {\n          this.previewsContainer = this.element;\n        }","sourceCodeStart":577,"sourceCodeEnd":613,"githubUrl":"https://github.com/dianping/cat/blob/e815e74d4c2dd74edac831241f1253fcc7d25381/cat-home/src/main/webapp/assets/js/uncompressed/dropzone.js#L577-L613","documentation":"After merging options, Dropzone needs an upload endpoint: it takes options.url, and if that is null falls back to the element's action attribute. If neither yields a URL, it throws 'No URL provided.' because every upload would fail without a destination.","triggerScenarios":"new Dropzone('#form') on a <div class=\"dropzone\"> (divs have no action attribute) without passing url; passing a form whose action attribute is empty or missing; options.url set to undefined by a typo'd key (urls: '/upload').","commonSituations":"Using a div.dropzone container styled with CSS but forgetting the url option; forms rendered without action (relying on JS submit); copying example markup that used a <form action=\"/upload\"> while switching to a div.","solutions":["Always pass url explicitly: new Dropzone(el, { url: '/file/upload' }).","Or use a <form class=\"dropzone\" action=\"/upload\"> so the action fallback works.","Check for typos in the url option key and that it is not overridden to a falsey value."],"exampleFix":"// before\nnew Dropzone('#dropzone-div'); // div has no action attr\n\n// after\nnew Dropzone('#dropzone-div', { url: '/file/upload' });","handlingStrategy":"validation","validationCode":"var url = opts.url || (el.getAttribute && el.getAttribute('action')) || DEFAULT_UPLOAD_URL;\nif (!url) throw new Error('Upload URL not configured for #'+el.id);\nnew Dropzone(el, $.extend({}, opts, { url: url }));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass url explicitly in the options object instead of relying on the form action fallback.","If using the action attribute, make sure the element is a <form action=\"/...\">.","Centralize upload endpoints in one config constant to avoid empty strings."],"tags":["dropzone","configuration","url","upload","vendor"],"backgroundTag":null,"analyzedSha":"e815e74d4c2dd74edac831241f1253fcc7d25381","analyzedAt":"2026-08-14T14:22:34.512Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}