Cloud API with JavaScript (Amazon, Azure)

前端 未结 5 1972
遇见更好的自我
遇见更好的自我 2021-02-14 06:50

I\'m researching a possibility of using some cloud storage directly from client-side JavaScript. However, I ran into two problems:

  1. Security - t

5条回答
  •  深忆病人
    2021-02-14 07:25

    With Amazon S3 and Amazon IAM you can generate very fine grained API keys for users (not only clients!); however the full would be PITA to use from Javascript, even if possible.

    However, with CORS headers and little server scripting, you can make uploads directly to the S3 from HTML5 forms; this works by generating an upload link on the server side; the link will have an embedded policy document on, that tells what the upload form is allowed to upload and with which kind of prefix ("directories"), content-type and so forth.

提交回复
热议问题