-
Hello! Thanks for making and maintaining react-uploady, it's a joy to use! I implemented signing with S3 parameters using However it turned out my compressed images weren't being used for uploading...after some digging it turns out the registered events in Relevant code: https://github.com/rpldy/react-uploady/blob/master/packages/core/life-events/src/lifeEvents.js#L142-L166 I would have expected something like results = regs.map(async (r: RegItem): any => {
let result;
if (r.once) {
removeRegItem(this, name, r.cb);
}
if (packValue) {
result = r.cb(...packValue);
} else if (!args.length) {
result = r.cb();
} else {
result = r.cb(...args);
}
return await result;
})
.filter((result: any): any => !isUndefined(result))
.map((result: any): Promise<any> => isPromise(result) ? result : Promise.resolve(result)); I can see both sides so unsure whether this is in fact a bug or rather a conscious design decision. For now I'll roll my code into one Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
thanks @leomelzer And as you mentioned, a single callback to handle these two aspects is the recommended way. |
Beta Was this translation helpful? Give feedback.
thanks @leomelzer
Indeed this was a design decision regarding how to handle pub/sub within Uploady.
And as you mentioned, a single callback to handle these two aspects is the recommended way.