CSV downloaded via curl is zero bytes

Contributor II

Hey JamfNation I am hoping someone can assist me here. We are using the jamf command setcomputername fromfile and I have a csv with 400+ entries of serials and computer names. I have uploaded the file to a webserver running iis7 and use

curl -O https://webserver/filename.csv

the file that gets outputted has zero bytes. What am I doing wrong here? PLEASE HELP!

for info the Mime type is set to application/octet-stream which is default for IIS and I have verified the permission on the file


Legendary Contributor III

I've never used that kind of syntax with curl before. While technically it should work according to the man page, I would probably try something like this:

curl https://webserver/filename.csv -o /tmp/filename.csv

I'm not clear if you need to add any flags after curl, like a header or something else. You'll need to experiment with that. Also, I see that it's an https server. Do you need to provide authentication for it to work? Like -u username:password perhaps?

Valued Contributor II

I could change the mime type to text/plain for CSV on your ISS server. Can you get it with a web browser with the same URL? What's in your ISS error log?

Contributor II

I’m an idiot it’s an https site I was getting a 302 redirect all better now

Contributor II

I had he command http 🤦‍♂️