The following is my method definition:
import play.api.mvc.{Action, Controller}
import java.io.{ByteArrayInputStream, FileInputStream, IOException, File}
import play.api.Logger._
import play.api.libs.concurrent.Execution.Implicits.defaultContext
import scala.concurrent.Future
import play.api.libs.iteratee.Enumerator
import play.api.mvc.ResponseHeader
import play.api.mvc.SimpleResult
import org.apache.commons.io.IOUtils
import java.nio.ByteBuffer
def do_something(name: String, address: String) = Action.async(parse.multipartFormData) {
/* Some code */
}
I am getting the following compilation error:
value async is not a member of object play.api.mvc.Action
Action.asyncwas first introduced in Play 2.2. But both 2.1 and 2.2 aren't supported anymore, so you should consider upgrading (the version as of this posting is 2.5.2).See the API docs for:
Play 2.1 - Action
Play 2.2 - Action