iControl iFileFile Issue

Hey all. I’ve tried using both Puppet and a simple curl request to create iFileFile objects without success. In both cases the iFileFile creation call appears to be successful, but the object is not created.

Anyone else come up against this? Better yet, overcome it?

I found DevCentral - An F5 Technical Community

I had to do a couple things to make the upload work though. Here’s my revised version:

!/bin/bash
filename=blah.txt
filesize=`wc -c < $filename`
echo $filesize
newfilesize=`expr $filesize - 1`
echo $newfilesize
filesize=$newfilesize

curl -k -u admin:admin \
  --trace trace.txt \
  --silent \
  --request POST \
  --header "Content-Type: text/plain" \
  --header "Content-Range: 0-$filesize/$filesize" \
  --data-binary "@$filename" \
  $filename | python -m json.tool