Compare commits

...

2 Commits
dev ... main

Author SHA1 Message Date
cca720e0a6 url-fix
All checks were successful
Deploy on Push / deploy (push) Successful in 1m13s
2024-05-27 15:26:23 +03:00
43856a3df6 trig
All checks were successful
Deploy on Push / deploy (push) Successful in 33s
2024-05-21 16:30:54 +03:00

View File

@ -29,9 +29,9 @@ async def upload_handler(request: Request):
key = str(uuid.uuid4()) + file_extension
s3 = boto3.client('s3',
aws_access_key_id=STORJ_ACCESS_KEY,
aws_secret_access_key=STORJ_SECRET_KEY,
endpoint_url=STORJ_END_POINT)
aws_access_key_id=STORJ_ACCESS_KEY,
aws_secret_access_key=STORJ_SECRET_KEY,
endpoint_url=STORJ_END_POINT)
try:
with tempfile.NamedTemporaryFile() as tmp_file:
@ -50,7 +50,7 @@ async def upload_handler(request: Request):
}
)
url = 'http://' + CDN_DOMAIN + '/' + key
url = CDN_DOMAIN + '/' + key
return JSONResponse({'url': url, 'originalFilename': file.filename})