S3Bubble OTT Streaming

shape
shape
shape
shape
shape
shape
shape
shape

S3Bubble Support Forums

To stay up to date with the latest S3Bubble updates and tutorials please make sure you sign up to our YouTube Channel.

home Forums General Questions & Bugs FR: File Downloads w Dynamically Generated Expiring Links

Viewing 2 reply threads
  • Author
    Posts
    • #31004
      Patrick
      Participant

      Hi,

      We’re trying to use Cloudfront to deliver our large file downloads to our members. File sizes run 2GB – 9GB.

      S3Bubble *almost* offers what we need and seems just a step away.

      Rather than defining a link to share, I’d like to tag an object as ‘shareable’. Then, when I paste the shortcode into WordPress, S3Bubble generates a unique link for every pageview. When someone clicks on the link, it starts the expiry countdown (and is valid for only the period of time we set when tagging an object as ‘sharable’).

      Basically – I’d love to replace the plug-in I use for this S3FlowShield (which doesn’t support Cloudfront distributions) with S3Bubble.

      Make sense?

    • #31009
      brazilianaire
      Participant

      Hi Patrick,

      I would love that too from S3Bubble, but I currently use S3 Media Vault from DAP/WCP

      http://wickedcoolplugins.com/dap/a/?a=11804&p=www.wickedcoolplugins.com/doc/s3mediavault-pro-installation/

      That may be an option until it becomes part of S3Bubble someday.

      Good luck!

      James O’Malley

    • #31011
      s3bubble
      Keymaster

      Hi Both,

      Actually delivering timed downloads with S3 is an easy call that can be done with the AWS sdk like this.

      // Create a presigned url
      $request = $s3Client->createPresignedRequest($s3Client->getCommand('GetObject', [
      	'Bucket' => 'bucket',
      	'Key'    => 'key'
      	]), '+5 minutes');
      $presignedUrl = (string) $request->getUri();

      CloudFront is actually a bit of a pain the called required is like below.

      // Create a signed URL for the resource using the canned policy
      $signedUrlCannedPolicy = $cloudFront->getSignedUrl([
          'url'         => $streamHostUrl . '/' . $resourceKey,
          'expires'     => $expires,
          'private_key' => '/path/to/your/cloudfront-private-key.pem',
          'key_pair_id' => ''
      ]);

      The difference being you need to add a private_key and key_pair_id then the pem need to be stored somewhere it just creates extra complexities so that’s probably why they don’t offer it the call above just needs two keys from an IAM user.

      Some docs: https://docs.aws.amazon.com/aws-sdk-php/v3/guide/service/cloudfront-signed-url.html

      Best Regards

      Sam

      • This reply was modified 4 years, 5 months ago by s3bubble.
      • This reply was modified 4 years, 5 months ago by s3bubble.
      • This reply was modified 4 years, 5 months ago by s3bubble.
      • This reply was modified 4 years, 5 months ago by s3bubble.
Viewing 2 reply threads
  • The forum ‘General Questions & Bugs’ is closed to new topics and replies.