def upload_file(): if request.method == 'POST': file = request.files['file'] filename = secure_filename(file.filename) fileextension = filename.rsplit('.',1)[1] Randomfilename = id_generator() filename = Randomfilename + '.' + fileextension try: blob_service.create_blob_from_stream(container, filename, file) except Exception: print ('Exception=' + Exception) pass ref = 'http://'+ account + '.blob.core.windows.net/' + container + '/' + filename return ''' File Link

Uploaded File Link

''' + ref + '''

''' return ''' Upload new File

Upload new File

'''