support `chunked_upload` and `files_put` with curl PUT method

Upload of the large file by curl PUT method for which it does not depend on the memory of PHP.
Please don't use short if-blocks. They are not good for readability