Can I use any HTML or JavaScript API to get the file's path in input[type=file]?

后端 未结 3 1449
夕颜
夕颜 2020-12-17 04:49

I want to implement an upload image function.

After uploading, I want get the file local path so I can create a thumbnail. But how can I get the file path? Is there

3条回答
  •  没有蜡笔的小新
    2020-12-17 05:10

    I think chrome supports this but not sure whether it is removed due to security reasons.Anyways you can try playing with javascrip to set custom width and height of some div and use readAsDataURL of the uploaded file

      
    
         my image 
    

提交回复
热议问题