Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleting images #17

Open
CodeMyst opened this issue Apr 24, 2020 · 5 comments · Fixed by kamil-karkus/imgpush#2 · May be fixed by #33
Open

deleting images #17

CodeMyst opened this issue Apr 24, 2020 · 5 comments · Fixed by kamil-karkus/imgpush#2 · May be fixed by #33

Comments

@CodeMyst
Copy link

could a feature be added for deleting existing images by their filename?

@hauxir
Copy link
Owner

hauxir commented Apr 25, 2020

I guess it could be added but there would need to be a way to authenticate users for that to happen

@lucacastelnuovo
Copy link

Could a system with an app_key work? Which could also be required for uploading.

@wassimoo
Copy link

I think authentication should be managed by the API or whatever service using imgpush.

@lucacastelnuovo
Copy link

lucacastelnuovo commented Jan 5, 2021

Yes, you are right.
Just an DELETE https://example.com/UUID.png route would be awesome.

Maybe then add a feature flag in ENV to disable the deletion route, for users who haven't implemented authentication.

@pdelaby
Copy link
Collaborator

pdelaby commented Apr 16, 2021

Good idea ! I'm currently working on it, and will test if for some time.
I'm trying to do as many checks as possible before proceeding the actual delete, to avoid DELETE https://my.host/. removing an entire folder and things like that :

  • checking the param agains basic regex
  • checking if the path exist and is a file

For the authentication, I'm experimenting with Traefik (auth + block call from outside the stack) and will share the working configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants