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

Image Previews docs typo #3081

Closed
phamduylong opened this issue Jan 5, 2025 · 1 comment
Closed

Image Previews docs typo #3081

phamduylong opened this issue Jan 5, 2025 · 1 comment
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@phamduylong
Copy link
Contributor

Link to the Page

https://next.skeleton.dev/docs/components/file-upload/svelte#image-previews

Describe the Issue (screenshots encouraged!)

Discord message

Correction:

function generatePreview(event) {
  const reader = new FileReader();
  reader.onload = (event) => {
    const image = event.target.result;
    // set the image as the src of an image element
  }
-  reader.readAsDataURL(details.acceptedFiles[0]);
+  reader.readAsDataURL(event.details.acceptedFiles[0]);
}
@phamduylong phamduylong added the documentation Improvements or additions to documentation label Jan 5, 2025
@endigo9740 endigo9740 added this to the v3.0 (Next) milestone Jan 5, 2025
@phamduylong phamduylong changed the title Imagr Previews docs typo Image Previews docs typo Jan 5, 2025
@phamduylong
Copy link
Contributor Author

I'll throw a quick PR for this.

@phamduylong phamduylong mentioned this issue Jan 6, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants