fix some 64bit-related compiler warnings
add API to upload an image at file path URL