Make image uploading work with folders