Standard Salesforce Web-to-Case and Web-to-Lead functionality does not support file attachments. When a customer submits a case or lead via an external web form, any files they want to include cannot be uploaded through the native Web-to-Case or Web-to-Lead mechanism. This article explains two supported workarounds to enable file attachment capability alongside case and lead submissions from external web forms.
By design, standard Web-to-Case and Web-to-Lead do not support file attachments. This is a known product limitation with no out-of-the-box configuration option to enable it.
Create a Visualforce page hosted on a Salesforce Experience Cloud site (or Force.com Site). The page includes standard Case or Lead fields alongside a file upload component — for example, using apex:inputFile or a custom LWC uploader component. When the form is submitted, a new Case or Lead record is created in Salesforce with the file attached. This approach allows full control over the form design, field inclusion, and file handling logic.
Use a custom external application or integration layer that calls the Salesforce REST API or SOAP API. The external web form collects Case or Lead fields and file data. The external application then makes API calls to: (1) Create the Case or Lead record in Salesforce, and (2) Attach the file using the ContentVersion and ContentDocumentLink objects.
Both workarounds described above can similarly be implemented for Web-to-Lead scenarios. Replace Case object references with Lead object references in the Visualforce page implementation or in the API calls.
There is an active idea on the Salesforce IdeaExchange for native Web-to-Case attachment support. Customers can upvote this feature request to prioritize its development.
000386429

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.