Hey everyone, any reason why my `context.request.f...
# suitescript
m
Hey everyone, any reason why my
context.request.files
would be an empty object when I have two file upload fields on a form in a Suitelet?
context.request.parameters
shows the correct data from the other fields and will grab the file name from the upload, but the files object is empty.
e
I think that
context.request.files
will only have the attached files from a file field created/added from the native serverWidget API. If you are creating your own HTML then you will have to add logic to attach files.
m
Thanks. I've tried to find something to verify that in the documentation, but haven't so far. I had a hunch because there is another Suitelet built with the serverWidget where this works, but, the form from the HTML file in this case is rendered exactly the same as the one from the serverWidget.
👌 1
b
you should only need to get the enctype to match
m
@battk thanks! that was it!