if ($landscape) { $landscape = substr($landscape, stripos($landscape, 'images')); $landscape_temp_url = dpsbridge_helper_scale_img($landscape, $width, $height, 'landscape'); $fp->uploadCover($folio_id, 'landscape', $landscape_temp_url); unlink($landscape_temp_url); } // If given a portrait image, scale and upload it, // as cover preview portrait image. if ($portrait) { $portrait = substr($portrait, stripos($portrait, 'images')); $portrait_temp_url = dpsbridge_helper_scale_img($portrait, $height, $width, 'portrait'); $fp->uploadCover($folio_id, 'portrait', $portrait_temp_url); unlink($portrait_temp_url); } // Attempts to upload the HTML Resources zip file. $response = $fp->uploadHTMLResources($folio_id, 'styles/' . $style . '/HTMLResources.zip'); if ($response['status'] === 'ok') { echo ' - Success: HTMLResource<br/>'; } else { echo ' - Failed: HTMLResource <br/>:: '; print_r($response); echo "<br/>"; } // If targeted Folio folder ID and list of local .folio file names are given. if ($folio_id && $filenames) { // If this is not the first time uploading, delete existing HTML articles. if ($status == 'Uploaded') { // Pull article metadata from designated Folio folder in Folio Producer. $articles = $fp->articles($folio_id); $articles = $articles['articles']; for ($n = 0; $n < count($articles); $n++) {