+ CURLcode err;
+ const char *path;
+ zval *ofile = *file, *otype = *type, *oname = *name;
+
+ convert_to_string_ex(file);
+ convert_to_string_ex(type);
+ convert_to_string_ex(name);
+
+ HTTP_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(file), curl_formfree(http_post_data[0]); return NULL);
+
+ /* this is blatant but should be sufficient for most cases */
+ if (strncasecmp(Z_STRVAL_PP(file), "file://", lenof("file://"))) {
+ path = Z_STRVAL_PP(file);
+ } else {
+ path = Z_STRVAL_PP(file) + lenof("file://");
+ }
+
+ err = curl_formadd(&http_post_data[0], &http_post_data[1],