diff --git a/Public API v1.yaml b/Public API v1.yaml index 10c5e3e..b1bccb7 100644 --- a/Public API v1.yaml +++ b/Public API v1.yaml @@ -16,7 +16,7 @@ paths: - downloader summary: Download video file description: |- - Downloads a video file with the given URL. Will include global args if they exist. + Downloads a file with the given URL. Will include global args if they exist. HTTP requests will return once the video file download completes. In the future, it will (by default) return once the download starts, and a separate API call will be used for checking the download status. @@ -41,7 +41,7 @@ paths: post: tags: - downloader - summary: Download video file + summary: Generates arguments used to download file description: Generates args, used for checking what args would run if you ran downloadFile operationId: post-generateArgs requestBody: diff --git a/backend/app.js b/backend/app.js index 5881a56..2ec7f98 100644 --- a/backend/app.js +++ b/backend/app.js @@ -803,7 +803,7 @@ app.post('/api/testConnectionString', optionalJwt, async (req, res) => { app.post('/api/downloadFile', optionalJwt, async function(req, res) { req.setTimeout(0); // remove timeout in case of long videos const url = req.body.url; - const type = req.body.type; + const type = req.body.type ? req.body.type : 'video'; const user_uid = req.isAuthenticated() ? req.user.uid : null; const options = { customArgs: req.body.customArgs,