managed_file widget, which is a part of Form API, by a set of useful features. See examples below to be involved.
These additional options for element with
'#type' => 'managed_file' is come with this module:
Browse files link before the file input to use one of available file managers:
// Also could be "ckfinder".
'#widget' => 'imce',
Tired to add an image styles for every managed file field?