Skip to content

Commit ecce329

Browse files
authored
Create FileUploadForm.java
1 parent 9c9be11 commit ecce329

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)