Create html container element(div) and add class 'file-upload'
Add a new attribute called data-callback set the value to the full function name. The function will be called back after loading the thumbnail and it will return the container element as parameter.
Structure is easily customizable.