[opencms-dev] File Upload with more then 1 file upload fields
Marian Kasala
marian.kasala at apsoft.sk
Fri Dec 13 09:10:39 CET 2002
Hi Nico,
I use following code in one of my PDF file upload form in backoffice.
It was intended for multi-language pdf upload.
inside form definition:
<input type="file" name="pdf_de">
<input type="file" name="pdf_it">
<input type="file" name="pdf_fr">
inside controlling class:
String pdfDe = (String) parameters.get("pdf_de");
if (pdfDe != null && pdfDe.length() != 0 && !pdfDe.equals("unknown")) {
byte[] pdf = cms.getRequestContext().getRequest().getFile(pdfDe);
if (pdf != null) {
// to do whatever needed
}
}
...
...
Best Regards,
Marian Kasala
AP Soft GmbH
Pod juhom 1
SK-911 01 TrencĂn
Tel.: +421 32 7480056
Fax: +421 32 7480053
----- Original Message -----
From: Nico Krause
To: opencms-dev at opencms.com
Sent: Thursday, December 12, 2002 4:58 PM
Subject: [opencms-dev] File Upload with more then 1 file upload fields
Hi guys ...
I tried uploading files with more then 1 file upload field.
But there seems to be no possibility to differ to files...
Is there only the possibility to get the File names with:
Enumeration files = cms.getRequestContext().getRequest().getFileNames();
??
the only thing would be if there is the first field empty the file name is called unknown...
or is it also possible to get a file from a fileupload field which is identified from the HTML 'name' attribute?
<input type="file" name="file1">
<input type="file" name="file2">
Thank you for any response...
Best Regards,
Nico
____________________________________
Nico Krause
NorthStar Communications GmbH
Wallbergstr. 20-22 85221 Dachau
Telefon: +49 (0) 81 31 / 9 96 87 - 53
Fax: +49 (0) 81 31 / 9 96 87 - 29
Mobil: +49 (0) 1 71 / 3 70 10 70
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20021213/fd70d98c/attachment.htm>
More information about the opencms-dev
mailing list