-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Description
Description
When calling client.media.upload() in the Plivo Python SDK, I receive an error that only image files (JPG, JPEG, PNG and PDF) are allowed, despite documentation and SDK code indicating support for audio/video types.
Steps to Reproduce
-
Install the Plivo Python SDK:
pip install plivo
-
Attempt to upload a WAV file:
from plivo import RestClient
client = RestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN")
client.media.upload(["example.wav", ])- Observe the error:
{
"error": "File format of the file to be uploaded should be one of JPG, JPEG, PNG or PDF"
}- Attempt to upload an MPEG file:
client.media.upload(["example.mpeg", ])- The upload succeeds and do not produce listed error message.
Expected Behavior
- WAV uploads are accepted per the documentation.
- MPEG uploads succeed in practice and should be recognized in the error message.
- The SDK error message and documentation should list all supported MIME types.
Actual Behavior
- WAV uploads are rejected while only listing image and PDF types.
- MPEG uploads succeed despite not being mentioned in the error output.
Environment
- plivo-python version: latest
- Python version: 3.12
- Operating System: Windows10
References
Plivo Media API documentation
SDK source with error logic
Suggested Fix
Update the SDK to include audio/video extensions (wav, mpeg, etc.) in the allowed list and error message.
Or clarify documentation if certain formats like wav are not intended to be accepted.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels