Я ссылаюсь на этот пост Использование curl для загрузки данных POST с файлами и этот ответ для загрузки файлов.
В Windows *
curl -F "file=@/c/Users/lf/Desktop/HQ/README" https://example.com/upload
curl: (26) Failed to open/read local data from file/application
и версия curl,
curl -V
curl 7.65.3 (x86_64-w64-mingw32) libcurl/7.65.3 OpenSSL/1.1.1c (Schannel) zlib/1.2.11 libidn2/2.2.0 nghttp2/1.39.1
Release-Date: 2019-07-19
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz Metalink MultiSSL NTLM SPNEGO SSL SSPI TLS-SRP
На Centos, (я тоже пытаюсь с sudo без успеха)
curl -F "file=@/data/HQ/README" https://example.com/upload
curl: (26) couldn't open file "/data/HQ/README"
и версия curl,
curl -V
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.36 zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets