I have a google app engine php55 service that periodically checks a public website and downloads a file. This file is typically small (<1MB). My simple app is based on the following:
<?php
$strSource = 'https://example.com/file.zip';
$strBucket = 'bucket-1234';
$strDirectory = '/path/to/file/'; // Google Cloud Storage directory
$strName = 'file.zip';
$strDestination = 'gs://' . $strBucket . '.appspot.com' . $strDirectory . $strName;
copy($strSource,$strDestination);
?>
I found this file occasionally is larger (over the 32MB response size limit). How do I write this script to handle the file whether it is 1MB or 100MB?
I see people recommend "Blobstore," which is something I do not have experience with. Even if I understood that solution (which seems to be focused on a very different use case), it does not appear to be available for PHP at all. Am I missing something?