Skip to content

Uploading & viewing via the Crocodoc API. Also includes the webhook for receiving the thumbnail image.

Notifications You must be signed in to change notification settings

ccagle8/php-crocodoc-upload

Repository files navigation

PHP Crocodoc Demo

This code was created out of parts of the code used to build DocumentLeads.com

Setup

  • Signup for an account on Crocodoc.com and grab your Key ID.
  • Add that Key ID to two pages: functions.php
  • Ensure that documents and cache are CHMOD'd to be writable.
  • Most PHP files need to have a MySQL connection. So include your connection file, or connect to MySQL at the top of functions.php to make things easy for you.
  • When these scripts save data to the database, it assumes the schema that is listed in documents.sql
  • Register the path of your webhook_crocodoc.php in the Crocodoc control panel.
  • Upload a new document via the upload.php file.
  • Go to the view.php file in your browser. You should see the file and thumbnail once Crocodoc processes them.

Crocodoc PHP library is available here.

I cannot remember where I found DocumentManager.php, but it was not written by me.

P.S. Sorry for all the different files, when they could probably be consolidated to less. I kept things separate because in the real word situation, this is more than likely going to be how it's done (upload, view, webhook, etc. being separate).

About

Uploading & viewing via the Crocodoc API. Also includes the webhook for receiving the thumbnail image.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages