How do I get URL from S3?


#1

I’m using https://atmospherejs.com/timbrandin/autoform-slingshot and I can get things uploaded to S3, but I can’t figure out where the download url (link to the file in the s3 bucket) is.

Here’s where I’m stuck:

  picture: {
      type: String,
      optional:true,
      autoform: {
        type: 'slingshotFileUpload',
        afFieldInput:{
          slingshotdirective: {
            directive: 'uploadToAmazonS3',
            // onBeforeUpload is called once on each file.
            onBeforeUpload: function(file, callback) {
                //const checking = callback(  );
                console.log(this);
            }
          }
        }
      }
    }

I need to save the url in the db but I can’t find it. Please help.


#2

The documentation says

The resulting field will contain the URL of the uploaded file

so when you submit the form it should save the URL.