sblakey/obsidian-quip

1mb limit on create

Opened this issue · 3 comments

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.

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).

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

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