Permalink
Browse files

Document the intended usage of addFile() better (bug #14635)

git-svn-id: http://svn.php.net/repository/pear/packages/HTTP_Request/trunk@267151 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 1b37187 commit a39a647dabe25068a931bbbc52d82445f5cf569a @sad-spirit sad-spirit committed Oct 10, 2008
Showing with 6 additions and 2 deletions.
  1. +6 −2 Request.php
View
@@ -582,9 +582,13 @@ function _arrayMapRecursive($callback, $value)
}
/**
- * Adds a file to upload
+ * Adds a file to form-based file upload
*
- * This also changes content-type to 'multipart/form-data' for proper upload
+ * Used to emulate file upload via a HTML form. The method also sets
+ * Content-Type of HTTP request to 'multipart/form-data'.
+ *
+ * If you just want to send the contents of a file as the body of HTTP
+ * request you should use setBody() method.
*
* @access public
* @param string name of file-upload field

0 comments on commit a39a647

Please sign in to comment.