Skip to content
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

Fix content uploads for modern browsers #952

Merged
merged 1 commit into from
Jun 11, 2019
Merged

Conversation

jryans
Copy link
Collaborator

@jryans jryans commented Jun 11, 2019

Modern browsers now expose a stream function on the Blob and File interfaces.
This conflicts with an older style of passing data to the uploadContent SDK
method, which supported supplying the data to upload in the stream property of
an object.

Since this old style is still in active use in the Matrix JS ecosystem, we
preserve the backwards compatibility for now by checking whether stream is a
function.

This fix has been tested in Firefox Nightly (69), Firefox Release (67), Chrome
Canary (77), and Chrome Stable (75).

Fixes element-hq/element-web#9913
Fixes #949

Modern browsers now expose a `stream` function on the Blob and File interfaces.
This conflicts with an older style of passing data to the `uploadContent` SDK
method, which supported supplying the data to upload in the `stream` property of
an object.

Since this old style is still in active use in the Matrix JS ecosystem, we
preserve the backwards compatibility for now by checking whether `stream` is a
function.

This fix has been tested in Firefox Nightly (69), Firefox Release (67), Chrome
Canary (77), and Chrome Stable (75).

Fixes element-hq/element-web#9913
Fixes #949
@ser
Copy link

ser commented Sep 23, 2019

I think it is that important that should be moved from "develop" as soon as possible

@jryans
Copy link
Collaborator Author

jryans commented Sep 23, 2019

I think it is that important that should be moved from "develop" as soon as possible

It was released in v2.0.1 of JS SDK on 2019-06-19 (~3 months ago) alongside Riot v1.2.2.

@t3chguy t3chguy deleted the jryans/file-api-changes branch May 10, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File uploads are broken on latest Firefox Nightly Uploads/Downloads broken in upcoming browsers
3 participants