We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34109
    • 119 Posts
    I'm building a site where we'll have web users registering, paying and uploading their own content. I want somehow to handle a direct upload to the S3 media source I've already set up. Is there a way I can hook into the Amazon sdk that's shipping with 2.2?

    Cheers!

    Chris
      Studio Republic
      http://www.studiorepublic.com
      0845 226 3205
      @christodhunter
      • 577
      • 132 Posts
      If I understand you correctly you are wanting to use the sdk outside of 2.2, if not you would just use 2.2. The answer is yes you can use it either way.

      Options
      ------
      1) You can just use the aws-php sdk from amazon (cause that is all it is)
      2) If you want the modx hooks you can dig down int into the core folder and find it. Its a series of class files and a modx wrapper class.
      3) Just us 2.2 and its native features

      As an example I did #2 myself and put it into 2.1 . Then loaded it as a service in 2.1 . So I have all the s3 love from the api level (not manager of course) in 2.1.

      If I understood exactly your situation I would be able to give you a more direct answer but overall the answer is yes.
        "One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow smiley"
        • 34109
        • 119 Posts
        What I'm hoping to do is to implement an upload form that a web user can upload a form directly to our Amazon bucket. They'd only be signed in to the front end so they wouldn't use the resource browser. I'll take a look at the class files and see what I can figure out
          Studio Republic
          http://www.studiorepublic.com
          0845 226 3205
          @christodhunter