code: function uploadFileFromString($path, $writeMode, $data)
      {
          Path::checkArgNonRoot("path", $path);
          WriteMode::checkArg("writeMode", $writeMode);
          Checker::argString("data", $data);
  
          return $this->_uploadFile($path, $writeMode, function(Curl $curl) use ($data) {
              $curl->set(CURLOPT_CUSTOMREQUEST, "PUT");
              $curl->set(CURLOPT_POSTFIELDS, $data);
              $curl->addHeader("Content-Type: application/octet-stream");
          });
      }
docs: Creates a file on Dropbox, using the given $data string as the file contents.
  
  <code>
  use \Dropbox as dbx;
  $client = ...;
  $md = $client->uploadFileFromString("/Grocery List.txt",
  dbx\WriteMode::add(),
  "1. Coke\n2. Popcorn\n3. Toothpaste\n");
  print_r($md);
  </code>
  
  @param string $path
  The Dropbox path to save the file to (UTF-8).
  
  @param WriteMode $writeMode
  What to do if there's already a file at the given path.
  
  @param string $data
  The data to use for the contents of the file.
  
  @return mixed
  The <a href="https://www.dropbox.com/developers/core/docs#metadata-details>metadata
  object</a> for the newly-added file.
  
  @throws Exception