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

Load files from web links #38

Open
habbes opened this issue Jun 3, 2018 · 2 comments
Open

Load files from web links #38

habbes opened this issue Jun 3, 2018 · 2 comments
Labels
api related to the api exposed by the xaval environment, libraries, methods, design, structure, etc. ux

Comments

@habbes
Copy link
Owner

habbes commented Jun 3, 2018

Besides loading files from the local computer, the file library should ideally also support urls (e.g. images from the web).

@habbes habbes added api related to the api exposed by the xaval environment, libraries, methods, design, structure, etc. ux labels Jun 3, 2018
@habbes
Copy link
Owner Author

habbes commented Jun 9, 2018

PR #42 provides a way to load images from links via the API: xaval.io.files.addImage(url: string, filename?: string).
So this is partially resolve. The missing part is allowing the user to do this via the UI.

@habbes
Copy link
Owner Author

habbes commented Jun 9, 2018

Well despite addImage allowing the user to add images from the web, I still get the following error when trying to display such images in the viewer:

Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.

So it appears there are security restrictions when displaying cross-origin images in the canvas and using getImageData.

I'll look more into this and potential solutions/workarounds when I get there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api related to the api exposed by the xaval environment, libraries, methods, design, structure, etc. ux
Projects
None yet
Development

No branches or pull requests

1 participant