(Doesn't work) Try to adapt s3 to server code