tracker issue : CF-4205576

select a category, or use search below
(searches all categories and all time range)

File upload rejects empty text files for no reason

| View in Tracker

Status/Resolution/Reason: To Fix//ThirdParty

Reporter/Name(from Bugbase): Bradley W. / ()

Created: 10/23/2019

Components: Language

Versions: 2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: Final /

Priority/Frequency: Normal / Some users will encounter

Locale/System: / Platforms All

Vote Count: 3

Problem Description:

If a user uploads a completely valid text file that is empty, CF throws an error.

Error Message: No data was received in the uploaded file myUpload.txt.
Error Detail: <br>Saving empty (zero-length) files is prohibited. <br>Verify that you specified the correct file.

This is a silly check.  I can't think of another utility such as attaching a file to an E-mail, placing a file in Google Drive, or uploading a file to Slack in which it makes any difference what the contents of my file is.  It's really none of CF's business whether the file is empty or not.  If it's valid, then store it.  I'm working on a site for govt filings for auto-generated export files and some files for some clients may have no data in the export but it's confusing for the users when our app rejects one of their uploads, which are required for them to complete their online filings.  

Steps to Reproduce:

Upload an empty text file

Actual Result:

The error above

Expected Result:

CF uploads my file, as requested, and doesn't try to get in the way with unwelcome "help".

Any Workarounds:

Catch the error on all file uploads.