Dispatch events when a file is uploaded, injected or removed

Useful in cases like #237

cc @ftassi