in one of my sites I use Netlify Forms with a input type “file” as explained in the Netlify docs.
The problem is that most of the time the attachment is lost.
The form is this: Work with Us | De Robert Calzature
I’ve already added a check if the file is bigger than 1MB, and added accepted files (.doc, .docx and .pdf), but that didn’t solve the problem.
It looks like this thread has be quiet since you first opened it. Are you still having this issue?
If so, This Support Guide is the first port of call to debug any forms issues. There are also many other Support Guides for forms - you can find them here: #Netlify-support:support-guides
We also recommend trying to search the forums or look at topics tagged Netlify forms if you haven’t already - it’s likely your question was already asked by someone else!
If you are still having problems, please let us know and include the following information in your response:
The URL for your live form as you want visitors to use it
The URL of your deployed html form. In case you have a javascript form, we need to literally be linked to the html version you’ve deployed, as mentioned above (look for “ pure javascript form ”)
The form name that you’ve set and that shows in our UI
Any errors or logs from the Netlify build logs, dashboard or browser developer console
Description of anything you have tried that did or didn’t help or make things better/worse
No, the form didn’t attached the file.
Although I discovered that if a user land on the homepage (or another page) and then navigate to the form, the error occurs. If a user land directly on the form page, the form will attach the files with no problems.
In order to achieve this workaround, the link in the menu pointing to the form page is a simple anchor tag instead of the nuxt-link for nuxt navigation, that seemed to trigger the problem.
That sounds like a very oddly specific problem, have you opened an issue in Nuxt’s Repo. My guess is they might have a better idea to why this is happening.
Have you checked this thread over? It looks like it might have some useful information to NUXT & Netlify forms users
In the mean time, I suggest you create an issue over on Nuxt’s repo. Just in case, I’ll make sure to escalate this for you. Perhaps @luke could help
Kudos to you for finding a temp solution. Hang tight… either Nuxt or Netlify should find a proper solution soon enough.
Please provide the information I requested above in the thread if you are able to. This will help a Support Engineer dig into this issue further.
The URL for your live form as you want visitors to use it
The URL of your deployed html form. In case you have a javascript form, we need to literally be linked to the html version you’ve deployed, as mentioned above (look for “ pure javascript form ”)
The form name that you’ve set and that shows in our UI
Any errors or logs from the Netlify build logs, dashboard or browser developer console
Description of anything you have tried that did or didn’t help or make things better/worse