File inputs with photo placeholder

MDB SupportCategory: MDB jQueryFile inputs with photo placeholder
slawa Pro User asked 3 months ago in MDB pro, version:4.4.5

It does not work for me.

Even the example on the this page does not work (latest chrome browser):

Bootstrap File Input

2 Answers
Jakub Strebeyko answered 3 months ago

Hi there Slawa,

Thanks for reaching out! Could you provide details as of how is the example not working, the code that fails to work, an eventual console output etc.? Thanks

With Best Regards,
Kuba

slawa Pro User replied 3 months ago

File inputs with photo placeholder

When you select a picture the placeholder is supposed to be replaced with a preview I assume… but nothing happens.

Jakub Strebeyko answered 3 months ago

Hi there Slawa,

The component’s purpose is presenting a layout suggestion with hint towards underlying logic, but it does not offer such functionality in itself (yet). The idea has been added for consideration, so stay tuned for updates!

With Best Regards,
Kuba

slawa Pro User replied 3 months ago

I used this to get the functionality if anyone else needs it:

https://github.com/blueimp/JavaScript-Load-Image

JavaScript Load Image is a library to load images provided as File or Blob objects or via URL. It returns an optionally scaled and/or cropped HTML img or canvas element. It also provides a method to parse image meta data to extract Exif tags and thumbnails and to restore the complete image header after resizing.