Added $optional property to upload lib