Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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():
Expand All @@ -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[ ]:
6 changes: 3 additions & 3 deletions config.py
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion vm1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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