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

Upload image not to preview when beforeUpload was false #8518

Closed
didmehh opened this issue Dec 8, 2017 · 4 comments
Closed

Upload image not to preview when beforeUpload was false #8518

didmehh opened this issue Dec 8, 2017 · 4 comments

Comments

@didmehh
Copy link

didmehh commented Dec 8, 2017

Version

3.0.0

Environment

react 16.2.0
antd 3.0.0
ubuntu 14.04
node 6.1.0

Reproduction link

Upload within codepen

Steps to reproduce

redirect to the codepen

What is expected?

could be show thumbnail

What is actually happening?

  1. Always show Uploading, no thumbnails.
    I am try to console log the file when handleChange. not to see url of status columns.
handleCardChange = ({fileList}) => {
    console.log("file list id change", fileList);
    this.setState({ cardImgList: fileList })
  }
  1. All right, I try to search this issue, but not helpful.
    #8020
@didmehh
Copy link
Author

didmehh commented Dec 11, 2017

Hi, i was solve it by #830.

    let reader = new FileReader();
    reader.readAsDataURL(logoFile);

set file url from reader.result
Ps: this issue was a feature?

@afc163 afc163 closed this as completed Dec 13, 2017
@afc163
Copy link
Member

afc163 commented Dec 13, 2017

I think it is better not doing anything if beforeUpload return false, let user decide what need to be done.

@didmehh
Copy link
Author

didmehh commented Dec 14, 2017

i don't known how to set header Content-Type for submit form within file input and use the fetch, or don't do anything.

@kamkyi
Copy link

kamkyi commented Jan 3, 2022

could you please show the complete codes @didmehh

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

No branches or pull requests

3 participants