Skip to content

Commit

Permalink
doc: Allow passing folder id in uploader SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
shantanutomarr committed Nov 12, 2024
1 parent 62356dc commit ca11c58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/videos-uploader/javascript-uploader.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ Make sure to replace the organization id with your own TPStreams organization ID

### Step 4: Select files and start upload
After you've created a file input on your webpage, you can pass those files to the uploader instance.
You can pass an optional folder id argument to `upload` method if you'd like to upload the videos to a specific folder.

```html
<script>
document.getElementById('uploadButton').addEventListener('click', () => {
const fileInput = document.getElementById('fileInput');
const file = fileInput.files[0];
uploader.selectFiles([file]);
uploader.upload();
uploader.upload(folderId="rPHYq8X5f9d");
});
</script>
```
Expand Down

0 comments on commit ca11c58

Please sign in to comment.