For some basic file system operations (e.g. ls and rm ), there are obvious analogs, but how would you implement more than just RESTful actions like cp or mv ?
How to answer the question How to implement a copied copy of a resource in REST? The preferred way to implement cp would be to include a getting resource, DELETing it and return it again with a new name.
But what if I need to do this effectively? For example, if the size of the resources will be huge? How can I eliminate the excessive transfer of the resource payload to the client and back to the source server?
Here is an illustration. I have a resource:
/videos/my_videos/2-gigabyte-video.avi
and I want to copy it to a new resource:
/videos/johns_videos/copied-2-gigabyte-video.avi
How can I implement copy, move, or other RESTful file systems? Or is there even the right way? Am I doing all this wrong?
source share