File name issue
Unanswered
Atlantic herring posted this in #help-forum
Atlantic herringOP
...
44 Replies
Atlantic herringOP
here is the code
make an hidden input that's value is
fileUrlAtlantic herringOP
can u elaborate pls
because from what i could see is that the state was defined, but not sent because you were doing a normal post action
@Atlantic herring can u elaborate pls
like create another input (like the rest have have id and name) and make the value of that to the fileurl hook so that it gets updated on upload
and make it hidden input the the user doesn't see it
but it will still be sent to the server
If I'm not wrong once file is uploaded, the input is not being rendered, I think it's the issue.
Can you once check without conditional rendering, show the input even if the file is already selected. Hope you understood.
your code is like big to understand...
@Atlantic herring Did it work
Atlantic herringOP
wait
@dumbboy <@775814099744325642> Did it work
Atlantic herringOP
removed the condition
the file didnt send to formspree
why can't you just use their normal method for files: https://help.formspree.io/hc/en-us/articles/115008380088-File-uploads
So the input is being rendered but not being sent?
@dumbboy So the input is being rendered but not being sent?
Atlantic herringOP
yes
@riský why can't you just use their normal method for files: <https://help.formspree.io/hc/en-us/articles/115008380088-File-uploads>
Atlantic herringOP
because it wont look as nice as this
u know what
ill use the regular method and change from there

tx for the help guys
Never in my introvert life thought that helping strangers online will feel this good.
Atlantic herringOP
@riský why can't you just use their normal method for files: <https://help.formspree.io/hc/en-us/articles/115008380088-File-uploads>
Atlantic herringOP
bro i tried but as soon as i try to check the file size or get any data from the file
it doesnt submit the file
it doesnt submit the file
i need to add a remove button
a file size limit
i cant do these if i use regular input
i changed some stuff
but same problem
can you manually reset the upload box?
like making the value to null or empty string '' (note: i haven't tested this)
Atlantic herringOP
wait
Atlantic herringOP
i think it works now
wtf
...so its good now?
Atlantic herringOP
im testing
W
it works
yay!
so you had an edge case? or you just fixed it? (second one is better, but both good because its sorted now)