Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
begenieus-jobs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ramdayal Munda
begenieus-jobs
Commits
90c38ec4
Commit
90c38ec4
authored
Jul 26, 2024
by
Pragati Upadhyay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conTentType
parent
7ce04f32
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
tutor-shot.js
controller/tutor-shot.js
+1
-1
ffmpeg-helper.js
helper/ffmpeg-helper.js
+0
-1
upload.js
helper/upload.js
+2
-1
No files found.
controller/tutor-shot.js
View file @
90c38ec4
...
...
@@ -129,7 +129,7 @@ module.exports.generateVideo = async function (req, res) {
let
remotePath
=
path
.
join
(
CONFIG
.
S3_TUTOR_SHOT
,
fileName
)
let
remoteThumbnailPath
=
path
.
join
(
CONFIG
.
S3_TUTOR_SHOT
,
thumbnailName
)
let
url
=
await
uploadToAwsS3
(
videoPath
,
remotePath
)
let
url
=
await
uploadToAwsS3
(
videoPath
,
remotePath
,{
contentType
:
'video/mp4'
}
)
await
uploadToAwsS3
(
thumbnailPath
,
remoteThumbnailPath
)
tutorShotData
.
thumbnailUrl
=
remoteThumbnailPath
tutorShotData
.
signedVideoUrl
=
await
generatePreSignedGetUrl
(
remotePath
)
...
...
helper/ffmpeg-helper.js
View file @
90c38ec4
...
...
@@ -83,7 +83,6 @@ module.exports.createVideo = async function (screenshots, outputPath) {
const
clip
=
await
createClipFromImageAsync
(
screenshot
,
duration
,
clipPath
);
clips
.
push
(
clip
);
}
console
.
log
(
"🚀 ~ returnnewPromise ~ clips:"
,
clips
)
await
concatenateClipsAsync
(
clips
,
outputPath
);
resolve
();
...
...
helper/upload.js
View file @
90c38ec4
...
...
@@ -22,7 +22,8 @@ module.exports.uploadToAwsS3 = async function (localPath, remotePath, options) {
var
params
=
{
Body
:
buffer
,
Bucket
:
CONFIG
.
S3_BUCKET_NAME
,
Key
:
remotePath
Key
:
remotePath
,
ContentType
:
options
&&
options
.
contentType
?
options
.
contentType
:
'application/octet-stream'
};
s3
.
putObject
(
params
,
function
(
err
,
data
)
{
if
(
err
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment