We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c9be11 commit ecce329Copy full SHA for ecce329
1 file changed
resteasy/uploadfile/FileUploadForm.java
@@ -0,0 +1,32 @@
1
+package com.zetcode.form;
2
+
3
+import org.jboss.resteasy.annotations.providers.multipart.PartType;
4
5
+import javax.ws.rs.FormParam;
6
7
+public class FileUploadForm {
8
9
+ private byte[] data;
10
+ private String fileName;
11
12
+ public String getFileName() {
13
+ return fileName;
14
+ }
15
16
+ @FormParam("fileName")
17
+ public void setFileName(String fileName) {
18
+ this.fileName = fileName;
19
20
21
+ public byte[] getData() {
22
23
+ return data;
24
25
26
+ @FormParam("selectedFile")
27
+ @PartType("application/octet-stream")
28
+ public void setData(byte[] data) {
29
30
+ this.data = data;
31
32
+}
0 commit comments