Skip to main content
Version: 4.0.0

⬆️ Upload File

Upload file using resumable session upload ID

await whatsapp.uploadResumableFile(
uploadId: 'UPLOAD_SESSION_ID',
file: File('sample_files/resumable-sample.png'),
fileType: 'image/png',
);
paramtyperequireddescription
uploadIdStringyesSession ID of the resumable upload
fileFileyesFile that you are going to upload
fileTypeStringyesType of file that you are going to upload

Web Platform

Most features work seamlessly on Flutter Web, however uploadResumableFile and createUploadResumableFile won't work due to CORS restrictions imposed by the WhatsApp Business API. Direct uploads from web browsers to external APIs are blocked for security reasons by meta.

Workaround for Web Uploads:

  • Implement a backend server to proxy upload requests
  • Upload files to your server first, then use uploadResumableFileByUrl with a public URL
  • For development, consider using mobile platforms or desktop builds

Resumable Return Methods