Yo! libcurl specify path stuff tripped me up too.
Short answer: Open the file yourself. Long answer:
- `CURLOPT_READDATA`: Needs a FILE* from `fopen()`.
- `CURLOPT_WRITEDATA`: Same deal.
- Paths? `/` works everywhere, but Windows devs might prefer `\\`.
Bonus: If you’re on Windows, watch out for file permissions. Sometimes libcurl fails silently if it can’t access the file.
Here’s a solid example: https://curl.se/libcurl/c/fileupload.html
Short answer: Open the file yourself. Long answer:
- `CURLOPT_READDATA`: Needs a FILE* from `fopen()`.
- `CURLOPT_WRITEDATA`: Same deal.
- Paths? `/` works everywhere, but Windows devs might prefer `\\`.
Bonus: If you’re on Windows, watch out for file permissions. Sometimes libcurl fails silently if it can’t access the file.
Here’s a solid example: https://curl.se/libcurl/c/fileupload.html
