playframework 2.0 - Writing multipart response in SimpleResult in Scala play -


i trying write action multipart response in scala play. should able serve files saved in resposne multipart response.

apart writing individual file content headers , writing files stream manually in simpleresult, there existing api can looked into?

do mean chunked responses? there few examples in the documentation:

def index = action {    val data = new fileinputstream(file)   val datacontent: enumerator[array[byte]] = enumerator.fromstream(data)    ok.chunked(datacontent)  } 

Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -