Compare commits

..

No commits in common. "main" and "dev" have entirely different histories.
main ... dev

View File

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