We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! I've tried to send photo via sendFile. Full construction is
client.sendFile(username, { file: data?.bufferFile, // U forceDocument: false, fileName: `${data?.picName}`, // Picture 2024-08-26 10-25-14.png mimeType: `image/${data?.picExt}`, // image/png caption: data?.message || "", // "" attributes: [new Api.DocumentAttributeFilename({ fileName: `${data?.picName}`, //Picture 2024-08-26 10-25-14.png })], })
The buffer image i get from front-end via socket.io:
const reader = new FileReader(); reader.readAsArrayBuffer(pic); reader.onload = async () => { const picName = pic.name; const picExt = pic.type.split('/'); const buffer = await pic.arrayBuffer(); buffer.name = pic.name; const bytes = new Uint8Array(buffer); }
So its always sent as file, not a photo. Any ideas to fix it?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi! I've tried to send photo via sendFile. Full construction is
The buffer image i get from front-end via socket.io:
So its always sent as file, not a photo. Any ideas to fix it?
The text was updated successfully, but these errors were encountered: