-
Hi, first of all, thanks for the amazing module, it works like a charm and it sped up my DX a lot. const formData = new FormData()
formData.append('file', file, file.name)
$myApi('my_endpoint/path', {
method: 'POST',
body: formData
}) It works for small files (like smaller than 1 MB, but I don't know precisely). But If I want to send a big file (for example, 10 MB), I get the error code
And I don't know how to fix this. Do you have any suggestions? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
What deployment provider do you use? To get around your provider's restrictions, you can enable client-side API requests. Note that this will expose your API credentials to the frontend. As the form data is serialised for the internal API proxy, its size increases by 33%. Perhaps your provider has a limit on how large the content can be? |
Beta Was this translation helpful? Give feedback.
-
I have a backend in PHP made with Symfony. I already set the limit to 20 MB and it works fine from the Swagger docs, but not from my frontend. I can't do a client-side request like you said, because I have some credentials to hide. Do you know what could it be? |
Beta Was this translation helpful? Give feedback.
Yeah at the moment I'm obviously testing it locally, thanks for the help, I forgot that the
nuxt-security
module has a request size limiter...