download files, finished migration fron django to flask