Fix file & signature adding not working in Api::update

The recent changes introduced a few undefined variables here and there,
which this commit should fix.