fixed file upload with imagemagick and storing the image path