You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Mayne, Peter" <Pe...@ap.spherion.com> on 2003/12/01 05:27:51 UTC
File upload from automated client
I'm trying to provide a file upload point within my Tapestry application
that a client can send a file to using a standard HTTP POST with
multipart/formdata. This involves implementing IExternalPage: that part
seems to work.
Normally, an @Upload works fine for file upload. However, in this case, the
client is automated, so there is no user to first fetch the
Tapestry-generated page, fill in the @Upload field (and others), and submit
it: the client will just submit a POST directly to the Tapestry upload page.
If I cheat and look at the HTML that Tapestry generates for my form, and get
the client to upload the same fields with the right data, it seems to work,
but this seems rather dangerous to me, since I presume I'm messing about in
undocumented and unsupported territory.
Is it possible to do this properly within the Tapestry framework, or is it
safer to just write a servlet that uses commons-upload directly?
Thanks.
PJDM
--
Peter Mayne
Technology Consultant
Spherion Technology Solutions
Level 1, 243 Northbourne Avenue, Lyneham, ACT, 2602
T: 61 2 62689727 F: 61 2 62689777
The information contained in this email and any attachments to it:
(a) may be confidential and if you are not the intended recipient, any interference with,
use, disclosure or copying of this material is unauthorised and prohibited; and
(b) may contain personal information of the recipient and/or the sender as defined
under the Privacy Act 1988 (Cth). Consent is hereby given by the recipient(s) to
collect, hold and use such information and any personal information contained in a
response to this email, for any reasonable purpose in the ordinary course of
Spherion's
business, including forwarding this email internally or disclosing it to a third party. All
personal information collected by Spherion will be handled in accordance with
Spherion's Privacy Policy. If you have received this email in error, please notify the
sender and delete it.
(c) you agree not to employ or arrange employment for any candidate(s) supplied in
this email and any attachments without first entering into a contractual agreement with
Spherion. You further agree not to divulge any information contained in this document
to any person(s) or entities without the express permission of Spherion.