We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In afterUpload event I validate using mmmagic if file extension is correct if not I remove file
afterUpload
ImagesCollection.on('afterUpload', async file => { const returnedFile = file; await validateUploadedFile(file) .catch(async error => { await ImagesCollection.removeAsync(file._id); returnedFile.error = error.message; }); return returnedFile; });
but on frontend in uploader.on('end', (error, fileObj) => { fileObj does not contain error property
uploader.on('end', (error, fileObj) => {
it was working in previous releases(before 3.0) when we were using Future
ImagesCollection.on('afterUpload', function (file) { const returnedFile = file; const futureResult = new Future(); validateUploadedFile(file) .then(() => { futureResult.return(file); }) .catch(error => { this.remove(file._id); returnedFile.error = error.message; futureResult.return(file); }); futureResult.wait(); });
Do you have any suggestion how to fix/implement this in 3.0.0-beta.6 version?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm having an issue:
In
afterUpload
event I validate using mmmagic if file extension is correct if not I remove filebut on frontend in
uploader.on('end', (error, fileObj) => {
fileObj does not contain error property
it was working in previous releases(before 3.0) when we were using Future
Do you have any suggestion how to fix/implement this in 3.0.0-beta.6 version?
The text was updated successfully, but these errors were encountered: