I am trying to have form with a file upload in it.
I have to have this form in a macro script. Everything has to be done through the Umbraco UI, so I don't see how I can write a server side controller. I only need to process the file, not save it to the server, if that makes any difference.
I can't figure out how to make this work. I always get 0 count for files uploaded and no file name. Any other form values I put in get passed through, just not the file information.
file upload in razor script - how to do it?
I am trying to have form with a file upload in it.
I have to have this form in a macro script. Everything has to be done through the Umbraco UI, so I don't see how I can write a server side controller. I only need to process the file, not save it to the server, if that makes any difference.
I can't figure out how to make this work. I always get 0 count for files uploaded and no file name. Any other form values I put in get passed through, just not the file information.
Here is my script:
Example of output (after selecting a file with the file browser)
ok - found the solution, had to add ' enctype="multipart/form-data"' to the form tag.
That is the difference between Friday afternoon brain dead and fresh Monday morning! :)
is working on a reply...