2

Currently I am working with pdfjs. I have added fabric.js to do annotations on pdf file.

Annotations saved in a .json file in Json format. Previously it was coming from AWS Dynamo DB but due to high volume of data now we want to move on AWS S3 bucket.I already integrated AWS library in Codeigniter.

Now how to load json file from S3 directly in fabric.js framework?

Alex Mac
  • 2,970
  • 1
  • 22
  • 39
  • this question is very broad, what do you want to achieve with fabric.js? It has so many possibilities and which btw. is a library and not a framework! – Vickel Jun 18 '17 at 20:22
  • How often is your target file(s) updated? – mikep Jun 22 '17 at 13:21

1 Answers1

1

You can install the aws cli and periodically sync your bucket with a local directory. aws sync does not download an unchanged file.

aws s3 sync s3://<bucket> <local directory>

You can also create a presigned URL and GET your file directly as described in https://docs.aws.amazon.com/aws-sdk-php/v3/guide/service/s3-presigned-url.html .

mikep
  • 3,841
  • 8
  • 21
  • You are right, but this will not help me because when user create even a single annotation, request will go to server and save this data to file. So periodically sync bucket will not work in my requirement. – Alex Mac Jun 24 '17 at 01:59