file upload : check if getvalue attribute exists before calling it

related to https://dev.sourcefabric.org/browse/LBSD-283
But after that, the image can be cropped...
I will update this branch later and update the `length` in the metadata from the stored file.