modifications to curlRequest to allow for image uploads