001 package com.khubla.pragmatach.examples.uploadexample;
002
003 import com.khubla.pragmatach.framework.annotation.Controller;
004 import com.khubla.pragmatach.framework.annotation.Route;
005 import com.khubla.pragmatach.framework.annotation.Route.HttpMethod;
006 import com.khubla.pragmatach.framework.api.PragmatachException;
007 import com.khubla.pragmatach.framework.api.Response;
008 import com.khubla.pragmatach.framework.controller.impl.FormPostBeanBoundController;
009
010 /**
011 * @author tome
012 */
013 @Controller()
014 public class UploadController extends FormPostBeanBoundController {
015 /**
016 * filedata. This is the name of the input element in the HTML
017 */
018 private byte[] filedata;
019
020 @Route(uri = "/upload", method = HttpMethod.post)
021 public Response render() throws PragmatachException {
022 return ok();
023 }
024
025 public byte[] getFiledata() {
026 return filedata;
027 }
028
029 public void setFiledata(byte[] filedata) {
030 this.filedata = filedata;
031 }
032 }