Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught error when uploading an empty file #885

Open
yacineak97 opened this issue Feb 23, 2024 · 0 comments
Open

Uncaught error when uploading an empty file #885

yacineak97 opened this issue Feb 23, 2024 · 0 comments
Labels

Comments

@yacineak97
Copy link

yacineak97 commented Feb 23, 2024

I'm having an issue:

  • If I upload an empty file, I encounter an uncaught error. Then, if I attempt to upload the same empty file again, the window becomes unresponsive, requiring a refresh to restore functionality.
  • I also noticed the same problem on the demo app located at https://files.veliov.com/.
  • Interestingly, I haven't observed this error when using the following code snippet:
SimpleSchema.setDefaultMessages({
  initialLanguage: 'en',
  messages: {
    en: {
     uploadError: (current) => i18n.__('SimpleSchema.uploadError', { label: current.label }), //File-upload
    },
  }
});
  • I can't even catch the error from the onError event of the insert

  • That's the error I had :

    {
    "isClientSafe": true,
    "error": 500,
    "reason": "[FilesCollection] [insert] Insert method accepts File, not a FileList. You need to provide a real File. File must have .name property, and its size must be larger than zero.",
    "message": "[FilesCollection] [insert] Insert method accepts File, not a FileList. You need to provide a real File. File must have .name property, and its size must be larger than zero. [500]",
    "errorType": "Meteor.Error"
    }

307333819-50532246-9725-4b35-8a89-fa56c066415a

Notes:
I am using ostrio:files@1.14.3 and ostrio:autoform-files@2.3.1

Then I upgraded those packages and the autoform package to latest versions and I have the same error with those verions :

  • aldeed:autoform@7.0.0
  • ostrio:autoform-files@2.5.1
  • ostrio:files@2.3.3
@yacineak97 yacineak97 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2024
@yacineak97 yacineak97 reopened this Mar 4, 2024
@dr-dimitru dr-dimitru added the bug label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants