Procházet zdrojové kódy

add pdf converter file flow

Ray Lee před 6 roky
rodič
revize
55927c8846
2 změnil soubory, kde provedl 52 přidání a 1 odebrání
  1. 2 1
      Sendy_Spec.md
  2. 50 0
      pdf_converter_file_flow.md

+ 2 - 1
Sendy_Spec.md

@@ -72,12 +72,13 @@ belongs_to :kdan_product
   stauts:[free_trial, subscribed, expired, refund, cancel]
 }
 ~~~
+* outsider: Not subscribed yet on pack
 * free\_trial: Subscription is in free trial period.
 * subscribed: Subscription is active now.
 * expired: Only for customer service/creative store offered products 
 * cancel: Auto-renew canceled but current subscription not changed.
 * refund: Auto-renew canceled and current subscription rollbacked.
-* status priority based on receipts.purchase_date
+* **status priority based on receipts.purchase_date**
 
 ### Schedule.rb
 * update KdanPackSubscriptionStatus every 15m

+ 50 - 0
pdf_converter_file_flow.md

@@ -0,0 +1,50 @@
+# 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
+