question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: displaying images from server not work

See original GitHub issue

Hey Guys,

I’m trying to Initialize uppy with pictures, but they don’t show up on the dashboard

Screen Shot 2021-03-13 at 7 23 51 PM
  

res.idea.images.forEach((file) => {
          Axios.get(
            "serverlink"+
              file,
            { responseType: "blob" }
          ).then((blob) => {
            console.log(blob.data);
            var fileURL = URL.createObjectURL(blob.data);
            uppy.addFile({
              id: file,
              name: file,
              type: "image/jpeg",
              data: blob.data,
              meta: {
                relativePath: null,
              },
              preview: fileURL,
              source: "Local",
            });
            uppy.getFiles().forEach((file) => {
              uppy.setFileState(file.id, {
                progress: {
                  uploadComplete: true,
                  uploadStarted: null,
                },
              });
            });
          });
        });

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
goto-bus-stopcommented, Mar 22, 2021

You are probably accidentally recreating the Uppy instance on each render. We have instructions for how to correctly initialize Uppy in both function components and class components.

0reactions
Murderloncommented, Aug 25, 2021

Closing this question to keep the issue count maintainable. If @goto-bus-stop’s suggestion didn’t fix your problem, we can still continue the discussion here even though it’s closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 Reasons Why Images Are Not Loading on Your Website
Website images fail to load for one of these seven common reasons.
Read more >
Resolve the "Images Not Showing on Website" Error [2022]
To resolve the images not showing problem, just close Chrome and open the Run prompt. Now, enter the '%localappdata%' command to go to...
Read more >
Images not showing when uploaded to server - Stack Overflow
Ok, the images are now working but for some reason the CSS isn't working correctly on my own server space, but works on...
Read more >
Why Are Web Page Images Not Showing? - Computer Hope
One way to diagnose this problem is to see if the image is being hosted on an alternate server. If it is, try...
Read more >
Why can I not see the images on my website? - Encode.Host
There are several possible reasons why your images are not showing up on your pages as expected: The image file is not located...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found