Author Topic: Delete file with curl  (Read 5314 times)

0 Members and 1 Guest are viewing this topic.

Offline rbarracca

  • Occasional poster
  • *
  • Posts: 2
    • View Profile
Delete file with curl
« on: January 28, 2014, 04:26:10 PM »
Greetings,

I am testing 2.3 beta and I am able to delete files through the web interface but I have not been able to figure out how to delete using curl on the command line.  I can use curl to successfully upload and download files, but I need to delete a file after I download it.  Has anyone been able to get this to work?

Thanks!
Bob

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 13014
    • View Profile
Re: Delete file with curl
« Reply #1 on: January 28, 2014, 11:35:18 PM »
welcome!
i can't help with curl, but if you use chrome, you go to the developer tools, network, right click on any request and "Copy as cURL"

Offline rbarracca

  • Occasional poster
  • *
  • Posts: 2
    • View Profile
Re: Delete file with curl
« Reply #2 on: January 29, 2014, 12:42:16 AM »
Thanks, that gave me exactly what I needed.  It gave me the syntax with a bunch of headers.  I was able to strip it down to this command to delete a file on my server:

curl "http://server/path/"  -u username:password --data "selection=filename&action=delete"

Thanks!  Love the software, keep up the great work!