Play framework 2.2.1 uploading videos to server on cloudbees

376 views Asked by At

I am trying to get my play 2.2.1 java application to upload video files to server. i am using cloud-bees for hosting the application. i am not sure what is the correct way to do this.

  • what should be in the model only a string (path) to file location on server ?
  • or a @Lob with binary data if so how do i extract bin data from request ?
  • what is the common practice ?
  • can you show/direct me to java code snippets showing how to do this properly ?
1

There are 1 answers

1
Captain Haddock On BEST ANSWER

What you don't specify is the place where you would like to store your video files. Be aware that for a multi-tenant service like CloudBees offers, the filesystem is not persistent. You have more information about this here.

For video storage you could use Amazon S3 or Youtube for example. For Amazon S3 you can read this article which explains you how to do it. You can look up for more examples on Internet. It is pretty straight forward, and as long as you create your bucket in Virginia (US) or Dublin (Europe), you will have low latency between your app and your file system.