ponzu-cms / ponzu

Headless CMS with automatic JSON API. Featuring auto-HTTPS from Let's Encrypt, HTTP/2 Server Push, and flexible server framework written in Go.
https://docs.ponzu-cms.org
BSD 3-Clause "New" or "Revised" License
5.68k stars 387 forks source link

adds physical file deletion, when deleting an uploaded file from Ponzu #301

Closed olliephillips closed 5 years ago

olliephillips commented 5 years ago

Note: I haven't incremented version in ponzu.json

There's a call from handlers.go to an extra function in filesystem.go. But 4 commits to get me there, given how ponzu-server is built/tested.

As an aside: maybe --dev flag should do some sort of file copy rather than clone? So we wouldn't need to commit to test. But I could be missing something in the workflow?

nilslice commented 5 years ago

As an aside: maybe --dev flag should do some sort of file copy rather than clone? So we wouldn't need to commit to test. But I could be missing something in the workflow?

You are definitely correct.. this was kind of a hack on my end just to be able to work on the project while I was trying to use it in client work. It needs to be re-thought for sure.

I tend to git commit --amend if I need to stack several commits when doing this kind of work, but it's not a good solution :)

olliephillips commented 5 years ago

Addressed both pieces of feedback in a couple of new commits. Should be cross compile compatible now. Tested Mac, but let me know if any problems.

olliephillips commented 5 years ago

Revised. New commit including strings.TrimPrefix