pdf_converter_file_flow.md 1.5 KB

PDF Converter Upload File Flow

Roles

  • server: pdf_converter
  • client: apps: pdf, nl, ad
  • 3-party: cloudconvert / zamzar

Related S3 Buckets

Preparing

  • converter: onlineconvertdev
  • ad: animation-desk-dev
  • nl: noteledge-dev
  • pdf: cloud-demo

Production

  • converter: onlineconvert
  • ad: animationdesk
  • nl: noteledge
  • pdf: pdfseries

1 step Convert

POST api/v1/convert

  1. client upload file to s3(app buckets)
  2. client call server api (tell server bucket_name & path)
  3. server setup input_file & output_file
  4. server request a mission to 3-party
  5. server download file from app buckets to converter server
  6. server upload file from converter server to s3 converter bucket
  7. server call 3-party api (tell 3-party bucket_name & path)

2 steps Convert

POST api/v1/create_mission

  1. client upload file to s3(app buckets)
  2. call api (tell server bucket_name & path)
  3. server setup input_file & output_file
  4. server request a mission to 3-party

POST api/v1/active_convert

  1. server download file from app buckets to converter server
  2. server upload file from converter server to s3 converter bucket
  3. server call 3-party api (tell 3-party bucket_name & path)

Convert Finished Callback

GET vendor/cloudconvert/callback

  1. 3-party call server callback
  2. server download file from converter buckets to converter server
  3. server upload file from converter server to s3 apps bucket