filereader - How to send base64 encoded file to PlayFramework server? -
i'd implement fileupload using new filereader api. client side, works , can send set request server right fields containing file in base64 encoded.
but in server side, it's not going great, here results :
logger.info(string.valueof(request().body().asraw())); // null logger.info(string.valueof(request().body().astext())); // null
and importantly :
logger.info(string.valueof(request().body().ismaxsizeexceeded())); // true !
what missing? how can create works?
thanks help!
i found reply question !
for looking it, here's reply :
you need add together bodyparser annotation method, , specify higher maxlength value.
@bodyparser.of(value = bodyparser.json.class, maxlength = 1024 * 1024) public static result method() { logger.info(string.valueof(request().body().asjson())); // not empty! }
file-upload filereader playframework-2.1
No comments:
Post a Comment