Add method handleDroppedFile
:
async handleDroppedFile(payload) {
this.broker.emit('compressor.compressed', {
id: payload.id,
...await this.compressFile(payload.filePath)
});
}
Declare new event handler in a service schema definition:
events: {
'electron.file-dropped': this.handleDroppedFile
}