Refined fileupload editor (for table record)

Note that, a table record might not yet been created when the editor is
there, so need to check if the host type and id are valid for the file
editor to show itself.