I tried to get and parse an xml file sent an upload from the gsp view. The file is correctly sent by the client but when I tried to parse it I have an exception.
------WebKitFormBoundaryPTpPKdL3WQWaPzJp-- (The filename, directory name, or volume label syntax is incorrect). Stacktrace follows: Message: ------WebKitFormBoundaryPTpPKdL3WQWaPzJp Content-Disposition: form-data; name="file"; filename="myfile.xml"
gsp:
<form enctype="multipart/form-data" method="post" action="uploadXml">
<input type="file" name="file" id="file" />
<input type="submit">
</form>
controller:
def project = new XmlParser().parse(request.reader.text)
Thanks
Aucun commentaire:
Enregistrer un commentaire