refactor/auto-resize fileupload directive