Skip to content

Commit

Permalink
🚀 Deployment Ready
Browse files Browse the repository at this point in the history
  • Loading branch information
sumukshashidhar committed Sep 19, 2020
1 parent 15ef3ea commit c723575
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
userlist.csv
*.png
*.jpg
.idea
Expand Down
2 changes: 1 addition & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def accept_incoming_image():
file_uuid = shortuuid.uuid()
filename = storage_directory + file_uuid + ".png"
f.save(filename)
ilog.log(response[1]['username'], file_uuid+".png")
ilog.log(response[1]['username'], file_uuid+".png", f"https://40.76.37.214:80/static/images/{response[1]['username']}/{file_uuid}.png")
return(flask.jsonify({
"status":200,
"message":f"Accepted the Image from user {response[1]['username']}"
Expand Down
4 changes: 2 additions & 2 deletions src/image_upload_logger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def log(username, filename):
def log(username, filename, link):
with open("userlist.csv", "a+") as f:
f.write('\n')
f.write(f'{username} , {filename}')
f.write(f'{username},{filename},{link}')
2 changes: 0 additions & 2 deletions src/userlist.csv
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@

nn1vh8Uxqcn5F6TmSh , JMq7onpJCmBXqNCb2mYiK5

0 comments on commit c723575

Please sign in to comment.