0

I am developing chrome packaged app, in that I am trying to store image file src

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABVYAAAMACAIAAABAXKuVAAAAAXNSR…VfbVgqaRelcVEBGsvnnbGxd3Egx8qvAVQZr7jWuhCJyuv+L/ESanfJ7fsXAAAAAElFTkSuQmCC

While storing it, I am getting following error in chrome app, can any one help?

Unchecked runtime.lastError while running storage.set: QUOTA_BYTES_PER_ITEM quota exceeded
    at FileReader.reader.onload (chrome-extension://lfpolenffdnfgbebcneolkflhgcjifmh/javascript/MajorOp1.js:241:22)
seenukarthi
  • 8,241
  • 10
  • 47
  • 68
Chaitanya
  • 67
  • 3
  • 8

1 Answers1

1

according to Chrome API for chrome.storage.local

The maximum amount (in bytes) of data that can be stored in local storage, as measured by the JSON stringification of every value plus every key's length. This value will be ignored if the extension has the unlimitedStorage permission. Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError.

So you need to specify unlimitedStorage permission in your manifest.json.

Please note, that it still won't work with chrome.storage.sync.

Next time when you post such a question, please also put the code you try to execute.

smnbbrv
  • 23,502
  • 9
  • 78
  • 109