create_preview_url()

Create a preview url

create_preview_url()

Create a preview url for a file. Only available for document formats with preview support.

Parameters

Name
Type
Description

$id

string

ID of the entry

Return

Name
Type
Description

$url

string

A preview url to the file

Usage

WPCP_ONEDRIVE_API::set_account_by_id('8c9bacda0-d8d8-4b22-b634-7b5281687575');
WPCP_ONEDRIVE_API::set_drive_by_id('b!DlaHWskCed_MIid3KpJH5Lbatf9HsdXBAZH5YcvPAbMhJUKzTJyzgvXZYpBS');

// Create preview url
$preview_url= WPCP_ONEDRIVE_API::create_preview_url('01EXLSWHWMQZNDMLRG7NFIWAVYCFJAXP2R');

Last updated