cURL requesting URL with whitespaces in URL.. What to do
Perhaps try replacing spaces with %20
?
Just use str_replace.
echo str_replace ( ' ', '%20', 'http://images.fastcompany.com/upload/Screen shot 2011-04-28 at 8.13.21 PM.png' );
I use:
$link = trim($link);
$link = str_replace ( ' ', '%20', $link);
For me just to put the name with spaces between "" worked.
Example
curl --upload-file "001- name - lastName.pdf" https://transfer.sh/ernesto
Notice the use of "" in "001- name - lastName.pdf"