Upload assets to S3 after in-browser upgrade

How can I configure it in a way that allows to me keep JS files in discourse installation server.