Skip to content

Conversation

@JanTvrdik
Copy link
Contributor

@JanTvrdik JanTvrdik commented Aug 5, 2016

How do you feel about adding isEmpty() shortcut to FileUpload
defined as $this->error === UPLOAD_ERR_NO_FILE?

@stepansvoboda
Copy link
Contributor

Seems useful to me.

@JanTvrdik
Copy link
Contributor Author

Converted to PR

@Majkl578
Copy link
Contributor

Majkl578 commented Aug 5, 2016

I thought this is about checking whether the uploaded file is empty, until I read the description... So the name is confusing name imho.

@hrach
Copy link
Contributor

hrach commented Aug 5, 2016

What about isFilled()?

@SlavaAurim
Copy link

Maybe noFile() (like constant name UPLOAD_ERR_NO_FILE)

@Majkl578
Copy link
Contributor

Majkl578 commented Sep 8, 2016

More options:

  • hasFile()
  • hasNoFile()
  • isFileMissing()
  • isFilePresent()
  • fileExists()

@dg
Copy link
Member

dg commented Sep 26, 2016

hasFile() seems perfect to me.

@JanTvrdik JanTvrdik force-pushed the pr/file_upload_is_empty branch from fc44509 to 0ce42e1 Compare September 27, 2016 07:48
@dg
Copy link
Member

dg commented Sep 27, 2016

Thanks

@dg dg merged commit 2bce63b into nette:master Sep 27, 2016
dg pushed a commit that referenced this pull request Sep 27, 2016
@JanTvrdik JanTvrdik deleted the pr/file_upload_is_empty branch September 27, 2016 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants