diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/screens/profile/CaptionScreen.tsx | 1 | ||||
-rw-r--r-- | src/services/MomentService.ts | 6 | ||||
-rw-r--r-- | src/store/actions/user.ts | 6 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx index 66106a6f..d329c589 100644 --- a/src/screens/profile/CaptionScreen.tsx +++ b/src/screens/profile/CaptionScreen.tsx @@ -166,6 +166,7 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => { handleVideoMomentUpload( mediaUri, videoDuration ?? 30, + caption, momentCategory, formattedTags(), ), diff --git a/src/services/MomentService.ts b/src/services/MomentService.ts index 3a677ccc..0292f9ea 100644 --- a/src/services/MomentService.ts +++ b/src/services/MomentService.ts @@ -223,7 +223,10 @@ export const deleteMomentTag = async (moment_tag_id: string) => { * @param value: string | undefined * @returns a PresignedURLResponse object */ -export const handlePresignedURL = async (momentCategory: string) => { +export const handlePresignedURL = async ( + caption: string, + momentCategory: string, +) => { try { // TODO: just a random filename for video poc, we should not need to once complete const randHash = Math.random().toString(36).substring(7); @@ -236,6 +239,7 @@ export const handlePresignedURL = async (momentCategory: string) => { }, body: JSON.stringify({ filename, + caption: caption, category: momentCategory, }), }); diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts index 14865f25..f01e2bac 100644 --- a/src/store/actions/user.ts +++ b/src/store/actions/user.ts @@ -380,6 +380,7 @@ export const handleVideoMomentUpload = ( videoUri: string, videoLength: number, + caption: string, momentCategory: string, formattedTags: { x: number; @@ -413,7 +414,10 @@ export const handleVideoMomentUpload = payload: {momentUploadProgressBar}, }); // get a presigned url for the video - const presignedURLResponse = await handlePresignedURL(momentCategory); + const presignedURLResponse = await handlePresignedURL( + caption, + momentCategory, + ); if (!presignedURLResponse) { handleError('Presigned URL failed'); return; |