ovh / php-ovh

Lightweight PHP wrapper for OVH APIs. That's the easiest way to use OVH.com APIs in your PHP applications.
Other
286 stars 106 forks source link

How to create and PUT a file on the Document endpoint ? #109

Closed Tchanove closed 2 years ago

Tchanove commented 3 years ago

Hi,

I'm having some trouble about the POST /me/document endpoint.

My use case is the following :

If my understanding of the OVH Api is right, I need to do the following steps :

Maybe my workflow is wrong too and there is another / simpler way to provision a database with a dump from another database ?

Help ! ^^

rbeuque74 commented 2 years ago

Hello, Sorry for the late answer.

This issue tracker is dedicated on problems with the php-ovh wrapper, please note that for every questions related to the API, you need to subscribe to the api-subscribe@ml.ovh.net, then, post your question to api@ml.ovh.net.

Regarding your question, a call to POST /me/document just return a putUrl as you said, and this URL is not related to the OVH API, so you don't need to use the php-ovh to call it. A simple cURL will work. The content of the file should be sent directly in request body, with the correct header Content-Type set.

Thanks Romain