MCPcopy Index your code
hub / github.com/ampproject/amphtml / isEmptyFile

Function isEmptyFile

src/form-data-wrapper.js:298–300  ·  view source on GitHub ↗

* Check if the given file is an empty file, which is the result of submitting * an empty ` `. These cause errors when submitting forms * in Safari 11. * * @param {!File} file * @return {boolean}

(file)

Source from the content-addressed store, hash-verified

296 * @return {boolean}
297 */
298function isEmptyFile(file) {
299 return file.name == '' && file.size == 0;
300}

Callers 1

appendMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected