Skip to content

Commit

Permalink
fixed s3_path issues in cropwizard-1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
star-nox committed Mar 19, 2024
1 parent f4cd916 commit e277c39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ai_ta_backend/service/export_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def export_data_in_bg(response, download_type, course_name, s3_path):
# upload to S3

#s3_file = f"courses/{course_name}/exports/{os.path.basename(zip_file_path)}"
s3_file = f"courses/{course_name}/{os.path.basename(zip_file_path)}"
s3_file = f"courses/{course_name}/{os.path.basename(s3_path)}"
s3.upload_file(zip_file_path, os.environ['S3_BUCKET_NAME'], s3_file)

# remove local files
Expand All @@ -234,6 +234,7 @@ def export_data_in_bg(response, download_type, course_name, s3_path):

# generate presigned URL
s3_url = s3.generatePresignedUrl('get_object', os.environ['S3_BUCKET_NAME'], s3_path, 3600)
#print("s3_url: ", s3_url)

# get admin email IDs
headers = {
Expand Down

0 comments on commit e277c39

Please sign in to comment.