Skip to content

Commit

Permalink
fix: added path for storing course media for s3
Browse files Browse the repository at this point in the history
  • Loading branch information
danish-kv committed Nov 14, 2024
1 parent 77a282d commit 49f884d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions course/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def get_presigned_url(request):

timestamp = int(time.time())
if file_type == 'video':
key = f'module_videos/{timestamp}-{filename}'
key = f'media/module_videos/{timestamp}-{filename}'
elif file_type == 'notes':
key = f'module_notes/{timestamp}-{filename}'
key = f'media/module_notes/{timestamp}-{filename}'
else:
return Response({'error': 'Invalid file type'}, status=400)

Expand Down

0 comments on commit 49f884d

Please sign in to comment.