diff --git a/app.py b/app.py index f19c13d..60ddf59 100644 --- a/app.py +++ b/app.py @@ -5,7 +5,7 @@ import os from flask import Flask, request, redirect, url_for, render_template from werkzeug.utils import secure_filename -from azure.storage.blob import * +from azure.storage.blob import BlobServiceClient import string import random import requests @@ -24,7 +24,7 @@ container = Config.get('DEFAULT', 'container') -blob_service = BlockBlobService(account_name=account, account_key=key) +# blob_service = BlobServiceClient(account_url=account, credential=key) @app.route("/") def main(): @@ -47,7 +47,7 @@ def upload_file(): if __name__ == '__main__': - app.run(host='0.0.0.0', port=80) + app.run(host='0.0.0.0', port=5000) # In[ ]: diff --git a/config.py b/config.py index 36d8ab0..24814b3 100644 --- a/config.py +++ b/config.py @@ -1,7 +1,7 @@ [DEFAULT] # Account name -account =storage3121 +account=storage3121 # Azure Storage account access key -key =tf2xNbMuBYORYtd+24fAc2coc8I9C4fJbXwmxgeFlOqyaU4zLhr7TLTC0D9cu6R3aXKhf6yX0TQBaMLh2AHvmw== +key=tf2xNbMuBYORYtd+24fAc2coc8I9C4fJbXwmxgeFlOqyaU4zLhr7TLTC0D9cu6R3aXKhf6yX0TQBaMLh2AHvmw== # Container name -container =upload +container=upload diff --git a/vm1.sh b/vm1.sh index 9c52911..c8ab85c 100755 --- a/vm1.sh +++ b/vm1.sh @@ -3,6 +3,7 @@ sudo ufw allow 5000/tcp sudo apt-get update sudo apt-get install python3 sudo apt-get install python3-pip -pip3 install azure.storage +#pip3 install azure.storage +pip3 install azure-storage-blob pip3 install configparser pip3 install flask