Are there file size limitations when using javascript FileReader API?

前端 未结 2 817
小蘑菇
小蘑菇 2020-12-10 06:09

You can use javascript FileReader API to display a preview of an image which is provided from a file input field. This comes in very useful in the sense that you don\'t have

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-10 06:18

    It appears there is no limitation on the filesize. I did the same thing as you in the past and noticed that the time before display is due to the storage in ram/browser. So the delay will depend on the user's computer. If you have to deal with a lot of big images (> 10MB) you can put a gif loader during the loading.

提交回复
热议问题