Skip to content
This repository has been archived by the owner on May 7, 2019. It is now read-only.

no API support for full CRUD #28

Open
DanielFGray opened this issue Feb 5, 2017 · 6 comments
Open

no API support for full CRUD #28

DanielFGray opened this issue Feb 5, 2017 · 6 comments

Comments

@DanielFGray
Copy link

ideally, I'd hope the API would allow the user to

  • upload new files
  • get a list of all files
  • update files
  • delete files

currently only supports the first

@camjac251
Copy link
Contributor

camjac251 commented Feb 5, 2017

I think deleting is already supported with #10

I haven't tested it though

EDIT: Nevermind, you mean fully deleting, not copying a deletion link

It would be a nice thing to have for say ShareX where you could have a context menu option for an upload with "Delete from Server and Locally" instead of having to go to the main site and delete it as well as remove the local file

@DanielFGray
Copy link
Author

That should be documented then.

@DanielFGray
Copy link
Author

Example API usage:

# delete
curl -X DELETE -F key="$key" https://u.pste.pw/api

# list
curl -X GET -F key="$key" https://u.pste.pw/api

# edit
curl -X PUT -F key="$key" https://u.pste.pw/api

Although the REST verbs could be replaced with specific API endpoints. Probably
needs more bike-shedding.

@TheReverend403
Copy link
Owner

tbh I'm considering doing a full rewrite with Django where the API will be a first class citizen. Maybe even a Vue SPA for the frontend.

@DanielFGray
Copy link
Author

I love the first-class API and SPA ideas.

@TheReverend403
Copy link
Owner

If only I knew JavaScript.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants