handleDataURL is only used by curl