I’m using Surface, and I have a LiveComponent that renders a form to do some upload of photos.
Everything works till the part when I press submit on the form, which throws an Error saying.
“no uploads have been allowed on LiveView named DoomWeb.SettingsInfoLive”
I dont understand why would the parent have any concern about what a LiveComponent is doing.
I dont want in any shape or form for the LiveView to have any control about what happens inside a LiveComponent.
When I add a new file to the @uploads that comes from the LiveComponent it does not complain because it has the @uploads done correctly… why it would be concern when the form is submited?
Some code:
<Form for={:upload} multipart={true} change="upload_validate" submit="upload">
{#for entry <- @uploads.file.entries}
...
{/for}
<Submit>Upload</Submit>
</Form>
I also tried, like it mentions from the document, or from what I understoon from the documentation.
<button :on-click={"upload", target: @myself}>Upload</button>
So my question is why is LiveView concern about @uploads?
why is not a LiveComponent handling the problem?