note 117990 deleted from function.curl-setopt by crell

From: Date: Thu, 31 Mar 2022 20:55:00 +0000
Subject: note 117990 deleted from function.curl-setopt by crell
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-217978@lists.php.net to get a copy of this message
Note Submitter: alvaro at demogracia dot com ---- With the legacy file upload feature, Curl sends the file name of the actual file and there isn't a documented way to change that behaviour. If you aren't able to use the CURLFile class there's a workaround that apparently works: append "; filename=" after the value (and make sure it comes after "type="). <?php $postfields = array( 'document[]' => '@/tmp/upload_qm5ee8FBxi; type=image/jpeg; filename=Kitten.jpg', );

« previous php.notes (#217978) next »