moata / kokoupload Goto Github PK
View Code? Open in Web Editor NEWUpload / Download files
Upload / Download files
Your API design looks like following RESTful API design.
But only this API is not really similar to that.
If you change this delete file
API to more like RESTful API, what kind of endpoint will it be?
I feel there might be suitable URL and HTTP method for that.
Could you create a branch like development
and push only document change to the branch?(You don't need to update the implementation itself)
[vagrant@localhost ~]$ curl http://127.0.0.1:5000/files/
<title>404 Not Found</title>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
[vagrant@localhost ~]$ curl -X POST http://127.0.0.1:5000/files/test.txt -T test.txt
http://127.0.0.1:5000/files/sASofDFARNan5OhhMNBNJw.txt
[vagrant@localhost ~]$ curl http://127.0.0.1:5000/files/sASofDFARNan5OhhMNBNJw.txt
test
[vagrant@localhost ~]$ curl http://127.0.0.1:5000/files/del/sASofDFARNan5OhhMNBNJw.txt
Not able to delete[vagrant@localhost ~]$
[vagrant@localhost ~]$ curl http://127.0.0.1:5000/files/sASofDFARNan5OhhMNBNJw.txt
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
As above, I got error on file delete, but file seems to be deleted.(got 404).
Could you check what is wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.