JavaのWebアプリケーション開発フレームワークによる、Webサイト開発の顛末記です。

EclipseのMavenを使った、Spring-MVC、Thymeleaf、MyBatis 等のプログラミングテクニックを、
備忘録的に記録しています。実際に動くソースコードを多用して説明していますので、
これからEclipseや、Spring-MVCを始めたいと思っている人にとって、少しでも参考になれば幸いです。
Spring-MVCの散歩道 > 応用の森(jQuery/JavaScript 編) > dropzone.jsを使用した、Ajaxでのファイルアップロードサンプル

package jp.dip.arimodoki.model;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

@Scope("prototype")
@Component
public class FormFile implements FormFileIf {

    /**
    * アップロードファイル
    */
    private MultipartFile[] uploadfile = null;

    /**
     * MIMEタイプ
     */
    private String[] imgtype = null;

    /**
     * 返却用Base64変換画像情報
     */
    private String[] respImage =null;


    public void setUploadfile(MultipartFile[] value) {
        this.uploadfile = value;
    }
    public MultipartFile[] getUploadfile() {
        return this.uploadfile;
    }

    public String[] getImgtype() {
        return imgtype;
    }
    public void setImgtype(String[] imgtype) {
        this.imgtype = imgtype;
    }
    public String[] getRespImage() {
        return respImage;
    }
    public void setRespImage(String[] respImage) {
        this.respImage = respImage;
    }
}