0
votes

I have app made using app inventor.

From there users selects image from phone.

The app sends the file via POSTFILE method to a PHP file.

The PHP file normally gets the file contents using:

$data = php_compat_file_get_contents('php://input')

But my host is on GoDaddy so I cant upload using this method.

So I want to use cloudinary but I get it to work. Is is due to same GoDaddy shared server restrictions?

Heres the cloudinary Upload code in the PHP file:

\Cloudinary::config(array( 
  "cloud_name" => "rafsystems", 
  "api_key" => "94993346XXXXXX", 
  "api_secret" => "bIgBADFROG-aU1GFLfHEzeQjWs" 
));
$result = \Cloudinary\Uploader::upload("php://input", array("public_id" => $file1));

So what options do I have. I need to sort this out asap for myself and a client

Thanks

1

1 Answers

0
votes
  1. Please note that the api_secret must not be revealed to the public. Please generate a new pair of api_key and api_secret from your account's settings page.
  2. We warmly recommend to upload the photo directly to Cloudinary from the browser (client-side upload), either signed or unsigned. Then, send the info, as returned by the upload response, to your PHP server?