sblakey / obsidian-quip

Obsidian plugin to publish notes to Quip.com
MIT License
24 stars 4 forks source link

1mb limit on create #18

Open sblakey opened 1 year ago

sblakey commented 1 year ago

Quip API complains if we create a document with more than 1mb of HTML. This is a very easy limit to hit, since the plugin is currently inlining images with data urls.

sblakey commented 1 year ago

Paths forward:

  1. Document the limit in the README (least I can do)
  2. Tell the user when this happens, ask if they want to try again without images (yuck)
  3. Try using the "import" instead of "create" API, to bypass the limit.
  4. Avoid inlining images by creating a "stub" document, adding blobs, then posting the document with image URLs pointing to those blobs (slow).
sblakey commented 1 year ago

I have verified (via curl) that the Quip API documentation is interestingly wrong:

  1. It accepts HTML content, larger than 1MB.
  2. The content-type should be multipart/form-data, NOT application/x-www-form-urlencoded
sblakey commented 1 year ago

Now to bludgeon Obsidian's requestURL into sending correct multipart/form-data...