*/
public function addUpload($fieldName, $fileNames)
{
+ if ($this->directUpload && $this->sendAsJson) {
+ throw new \Exception(
+ 'Cannot do direct upload with JSON requests'
+ );
+ }
+
if ($this->host->endpoints->media === null
|| $this->directUpload
) {