Skip to main content
Question

CSV downloaded via curl is zero bytes


Forum|alt.badge.img+15

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

4 replies

mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • July 24, 2018

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?


Forum|alt.badge.img+15
  • Contributor
  • 589 replies
  • July 24, 2018

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?


Forum|alt.badge.img+15
  • Author
  • Contributor
  • 92 replies
  • July 24, 2018

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


Forum|alt.badge.img+15
  • Author
  • Contributor
  • 92 replies
  • July 24, 2018

I had he command http 🤦‍♂️


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings