-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
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
[bug] Can't send files #1137
Comments
It seems like your environment does not support You could try to overwrite |
I am using the latest version of Chrome, Based on the comparison of the source code, I suspect that in v2.0.0, there was a missing check for Blob and file types. |
Ah, thank you! Previously, Binarypack was designed to produce To avoid making all of Binarypacks interface async, Blobs should to be a special case within |
As this is an `async` operation, we need to `await conn.send(..)` to keep the order of transmitted files. Closes #1137
🎉 This issue has been resolved in version 1.5.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I find it strange that I am still experiencing the same problem when using 1.5.1.
(Incidentally my code works fine with version 1.3.1) |
Could you give me bit of code to reproduce your error, @Lianting-Wang? |
This is the sample code from P2P File Transfer example which works in 1.4.7. function sendFile() {
const file = fileInput.files[0]
const blob = new Blob([file], { type: file.type })
peerConnection.send({
dataType: 'FILE',
file: blob,
fileName: file.name,
fileType: file.type,
})
} In 1.5.1, we can send file directly, but if we send like above we would get function sendFile() {
const file = fileInput.files[0]
peerConnection.send(file)
} |
Error
environment
When I use 1.5.0, there will be error that Blob does not support。But when I use 1.4.7, there is no problem
I guess, the reason should be on Peerjs-JS-BinaryPack.At 2.0.0, I rewritten the problem with TS
The text was updated successfully, but these errors were encountered: