HTML-Form Client Side Video Uploads
Utilize this approach to enable video uploads from the client side through your browser-based HTML website.
Please don't use your API key on the client/browser side. Use this method to upload videos directly from the client side of your web app.
1. Generate Upload URL on Server Side
Please keep in mind that the URL generated by this endpoint has a validity period of 24 hours. To ensure uninterrupted functionality, remember to call this endpoint every 24 hours to regenerate the upload URL.
GET
https://api.dyntube.com/v1/uploads/browser-upload-url
Use this endpoint to get a URL using the API key on the server side of your app. The returned URL can be used to POST the files from your HTML FORM in the browser.
Headers
Name | Type | Description |
---|---|---|
Authorization | String | Bearer [API TOKEN] |
2. Upload Videos using HTML From
The file can be added to form into an input named "file".
The Content-Type should be multipart/form-data.
You can optionally provide other fields, such as
projectId.
Upload by file
POST
...GENERATED URL IN STEP 1...
Request Body
Name | Type | Description |
---|---|---|
projectId | String | Project Id |
file* | File | File to upload |
title | String | Video Title |
description | String | Video description |
tags | String | Video tags, add multiple tags by adding the 'tags' field multiple times in your POST request with different values. |
Last updated