Using JAX-RS to achieve online file storage concept