rejetto forum

Delete file with curl

0 Members and 1 Guest are viewing this topic.

Offline rbarracca

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
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: 13510
    • View Profile
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: 5
    • View Profile
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!