Fix picture upload

Fixes #338