Lulu Developer Forums

API Development Community

RSS Feed

Cover file upload issue on new project creation

  1. hi all,

    I am using project creation API for create project. In that process i want to upload two files, one interior pdf and cover pdf file.
    Interior pdf file uploaded from my server and now i want to upload cover pdf file.

    The cover file is created from cover generation API, and i get the return url showing the cover pdf.

    $data = array('upload_token' => $upload_array->token,
    'auth_user' => 'sijo@gmail.com',
    'auth_token' => $auth_array->authToken,
    'interior' => '@/home/public_html/sample.pdf',
    'cover' => @$cover_array->generatedPdfURI);

    "$data" post arguments array for upload api action
    "$cover_array->generatedPdfURI " the cover pdf file path.

    now i getting the result as,
    stdClass Object ( [error_value] => attempted to get size of non-existent file /mnt/isilon/luludotcom/code/www_lulu/api_upload//sijo@cubettech.com/ [error_type] => LFilesystemException )

    Please help,

    thanks.

    Message edited by sijolulu 2 years ago

  2. Josiah Gore2 years ago

    The generatePdfURI that is returned by the cover generation code cannot be used as an input to a cURL call. You must first download the file locally then refer to it as you do the interior file. In the future we will have a mechanism for managing files in our system and removing the need to download it, but currently that is what you need to do.

[ Page 1 of 1 ]