I have done a lot of reading to understand difference between PUT and POST and from what I have gathered, PUT should have a resource specified in the URI. Does this mean that when uploading a file, the client specified what filename it is going to be? What about the place where the file is going to be stored, do I specify this in the corresponding method in PHP for this endpoint? Should multipart data ever be sent via PUT at all?
Asked
Active
Viewed 100 times
1 Answers
-1
PUT generally means update a resource while Post means Create.
Nothing prevents sending a file via PUT, for example I could create a user account uploading its profile image via Post (Create) but then the user wants to change his/her profile image so I could do this edit via PUT(update).

niceman
- 2,653
- 29
- 57