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.

upload component not work when img url has some params, example: show from aliyun oss

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.3.1

Environment

chrome 65.0

Reproduction link

Steps to reproduce

i got example from here, then add some params to url. not work.

What is expected?

show image

What is actually happening?

not show

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
didmehhcommented, Apr 19, 2018

hi guys, my antd version still at 3.3.1. i had resolve it by parse remote img to base64. for example:

function base64Url(url, callback) {
  let xhr = new XMLHttpRequest();
  xhr.onload = function() {
    let reader = new FileReader();
    reader.onloadend = function() {
      callback(reader.result);
    }
    reader.readAsDataURL(xhr.response);
  };
  xhr.open('GET', url);
  xhr.responseType = 'blob';
  xhr.send();
}

const url = 'http://img15.3lian.com/2015/f1/38/d/41.jpg'
base64Url(url, (result) => {
    console.log("result base64 url was", result)
})
1reaction
afc163commented, Apr 17, 2018

Did you mean the image url "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png?time=20180417" will not display image correctly?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Object Storage Service:IMG implementation modes
To process an image object by using its URL, you can add Image Processing (IMG) parameters or image style parameters to the end...
Read more >
Upload - Ant Design
Uploading is the process of publishing information (web pages, text, pictures, video, etc.) to a remote server via a web page or upload...
Read more >
My local Images Are not working Once i added parameters to ...
I have tried using require but it just gives me a huge error with all of my images and some css. I expect...
Read more >
Object Storage Service
The client obtains authorization to upload to OSS (the signed URL or form) and calls the mobile client SDK provided by OSS to...
Read more >
Object Storage Service Best Practices - Alibaba Cloud
Plupload is used in this example to upload form data (PostObject) to OSS. ... from an Alibaba Cloud account or a RAM user...
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