latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Image served from s3/cf integration success!

Home Forums Community Forum Image served from s3/cf integration success!

This topic contains 13 replies, has 3 voices. Last updated by  Mike (Volunteer Moderator) 3 years, 4 months ago.

Topic Author Topic
Posted: Sunday Aug 11th, 2013 at 5:17 am #55540

Hi guys,

I managed to finally configure s2 member with cf/s3 and I just need some help with something else. Within my protected ( members area) of my website how do insert images from my s3 bucket? Any file that I put into my bucket that is s3/cf configured with s2 won’t show on my website. I get this message.

AccessDenied

Access Denied
597DB32ECCC1ACBD

YRcAvOdDmYiTUBDYJOOFM2rAJ8hn/M1f4JD0q89xnu17BTmBeIs+e6vVUDdHTlf/

Now I know this is a good thing because it blocks public from viewing the image. Basically I have a couple of images that I need to insert into my page on my members area but everytime I proceed to create the url

eg. cdnurl/directory/filename.jpg it does not work.

I have setup CDN b4 manually for one of my other websites but that is all public so there are no issues.

In a nutshell how do I insert images into my members area from the amazon bucket that is protected by s2 auto-integration?

List Of Topic Replies

Viewing 13 replies - 1 through 13 (of 13 total)
Author Replies
Author Replies
Posted: Tuesday Aug 13th, 2013 at 7:17 am #55657

If you need to show the image to a user that doesn’t have access to it because it’s protected, you’ll need to add a download key to the URL. Please see: [hilite path]Dashboard -› s2Member® -› Download Options -› Advanced Download Restrictions[/hilite]

Or you can make a copy of the file you need to show publicly, and put it in another bucket that isn’t protected by s2Member.

I hope that helps. :)

Posted: Tuesday Aug 13th, 2013 at 10:41 am #55676

Hi Cristian

Thanks for the reply.

I basically need my protected images to be served as inline pictures. I don’t have any idea on how to do this. I’m just so use to uploading media VIA wordpress then inserting it into the page. What is the procedure for inserting cloudfront images into my pages with s2

Posted: Tuesday Aug 13th, 2013 at 6:57 pm #55704

Ah, I see. Well, you will need to learn one HTML tag, the one for images.

Here’s a very basic example:

<img src="[[s2File download="your-protected-image.jpg" /]]" />

Here’s more information on the img tag: http://www.w3schools.com/tags/tag_img.asp

Posted: Tuesday Aug 13th, 2013 at 8:35 pm #55708

Thanks mate :)

Posted: Tuesday Aug 13th, 2013 at 10:20 pm #55711

No problem. :)

Posted: Wednesday Aug 14th, 2013 at 8:07 am #55756

what if the file is in a sub directory inside my protected bucket?

Posted: Wednesday Aug 14th, 2013 at 8:09 am #55758

Also when I use the code provided the image does not show up.

Posted: Wednesday Aug 14th, 2013 at 8:09 am #55759

Try adding it before the file’s name:

<img src="[[s2File download="bucket-sub-dir/your-protected-image.jpg" /]]" />
Posted: Wednesday Aug 14th, 2013 at 8:11 am #55760

Also when I use the code provided the image does not show up.

Maybe because it was in the subdir and you had not included it in the shortcode?

If you just use the shortcode, do you get a URL to the file? And if you open it in a browser window, does it open the file?

Posted: Wednesday Aug 14th, 2013 at 8:27 am #55765

Hi there. I tried both in regards to image not showing up. I do get a URL to the file and it does open the file up. Is this a good sign?

It seems to be only when try inline it.

Posted: Wednesday Aug 14th, 2013 at 8:28 am #55766

* When I try to insert the image with HTML code the problem occurs.

Posted: Thursday Aug 15th, 2013 at 6:18 am #55885

Could anyone help me on this?

Posted: Thursday Aug 15th, 2013 at 7:15 pm #55918
Moderator

Please see: Dashboard -› s2Member® -› Download Options -› Inline File Extensions

Viewing 13 replies - 1 through 13 (of 13 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.