Forum Discussion
How to overwrite iFileFile with iControlREST
I have uploaded files to F5 with iControlRest using "/mgmt/shared/file-transfer/uploads/" first and then "/mgmt/tm/sys/file/ifile" and now I want to overwrite them. The first method lets overwrite the file but the second one ("/mgmt/tm/sys/file/ifile") don't. I have tried with PUT but the response is "Operation is not supported on component /sys/file/ifile". Could you tell me how I can overwrite this?
- Peter_van_de_RiNimbostratus
Thanks, exact what I needed.
- Jad_Tabbara__J1Cirrostratus
Hello Puri,
You can achieve this using the following command :
To create the ifile use:
curl -sk -u admin:admin -H "Content-Type: application/json" -X POST https://x.x.x.x/mgmt/tm/sys/file/ifile -d '{"name":"ifile_name","source-path":"file:/path/of/file"}'
To update the ifile use:
curl -sk -u admin:admin -H "Content-Type: application/json" -X PUT https://x.x.x.x/mgmt/tm/sys/file/ifile/ifile_name -d '{"source-path":"file:/path/of/newFile"}'
Please let me know if it works for you.
I've already tested in my lab.
Waiting for your update.
Regards
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com