Keyword

K2 attachment using cloud storage

  • Vincent Murphy
  • Vincent Murphy's Avatar Topic Author
  • Offline
  • New Member
More
14 years 2 months ago #87540 by Vincent Murphy
K2 attachment using cloud storage was created by Vincent Murphy
Hi,
Wondering if anybody knows of a method to integrate amazon S3 storage with K2 attachments. I have a large volume of attachments which I'd like to store using the S3 service but I need to integrate it with my K2 item maintenance. Don't want to reinvent the wheel if something already exists.

Thanks.

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #87541 by william white
Replied by william white on topic K2 attachment using cloud storage
I have heard talk of Akeeba Backup using a cloud to store backups but havent heard talk of this yet. It will be an intresting discussion.

Please Log in or Create an account to join the conversation.

  • Vincent Murphy
  • Vincent Murphy's Avatar Topic Author
  • Offline
  • New Member
More
14 years 2 months ago #87542 by Vincent Murphy
Replied by Vincent Murphy on topic K2 attachment using cloud storage
Yes the Akeeba Backup Pro version does this and it works like a charm. I use it for all my sites now. I'm hoping to be able to do a similar thing with K2 attachments.

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #87543 by Case Noland
Replied by Case Noland on topic K2 attachment using cloud storage
I do this in a slightly hack-ish way but it works great. Script file attached.

<<SEE ATTACHED .TXT FILE FOR CODE>>

Now your title attribute is the full URL to your download. If using Amazon S3 be sure to set proper ACL privileges.
You will still need to upload some sort of dummy file (empty txt doc, etc.) which is why it's hacky.

I also updated the language file to make the new functionality more apparent to other users.

Hope this helps,
Case

Please Log in or Create an account to join the conversation.

  • Vincent Murphy
  • Vincent Murphy's Avatar Topic Author
  • Offline
  • New Member
More
14 years 1 month ago #87544 by Vincent Murphy
Replied by Vincent Murphy on topic K2 attachment using cloud storage
Thanks for the tip. I'll check it out.

Case said:I do this in a slightly hack-ish way but it works great. Script file attached.
SEE ATTACHED .TXT FILE FOR CODE>>

Now your title attribute is the full URL to your download. If using Amazon S3 be sure to set proper ACL privileges.
You will still need to upload some sort of dummy file (empty txt doc, etc.) which is why it's hacky.

I also updated the language file to make the new functionality more apparent to other users.

Hope this helps,
Case

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #87545 by alp pp
Replied by alp pp on topic K2 attachment using cloud storage
hello case,

i guess you miscopied the replacement with the original code... anyway, i somehow guessed & managed to change the code (see text attachment) it worked perfectly for the external url's.

it's great to have external links inside k2, and your post was very helpful for me to see from where it could be done... thank you indeed...
Attachments:

Please Log in or Create an account to join the conversation.

More
14 years 1 week ago #87546 by Joseph Cotten
Replied by Joseph Cotten on topic K2 attachment using cloud storage
Guys, can you help a rookie understand this a little better?

So, if I replace the code you listed from item.php with the new code you attached to this thread, what's my next step?
I have mp3 files on my Amazon S3 space, and I want to attach them to K2 Items. Right now I'm using the JoomlaWorks AllVideos plugin to display the remote mp3s. So, how can I get K2 to display those remote mp3s via the K2 Attachments field?

Please Log in or Create an account to join the conversation.

More
14 years 1 week ago #87547 by Case Noland
Replied by Case Noland on topic K2 attachment using cloud storage
Hi Joseph, replacing the old code with the new snippit basically changes the functionality of the 'Title Attribute' to be the HTTP download link (TITLE)

In this way you can use the HTTP URLs from your S3 account and still have the simple K2 input form and ability to turn it on/off in various locations/templates.

As I mentioned previously, I also updated the K2 language file to ensure K2 users with editing privileges knew what information to put in each box.

You'll also need to ensure your S3 ACL settings have read access for public users enabled.

Please Log in or Create an account to join the conversation.

More
14 years 1 week ago #87548 by alp pp
Replied by alp pp on topic K2 attachment using cloud storage
just one problem about the code, unfortunately the download counter does not work and stay as "0"

Please Log in or Create an account to join the conversation.

More
14 years 1 week ago #87549 by Joseph Cotten
Replied by Joseph Cotten on topic K2 attachment using cloud storage
Thanks for replying so fast!

When you say “Title Attribute” are you talking about the field that appears when you Add an Attachment to a K2 Item?

A scenario: I have an audio file of a message. I want to store the audio file on my Amazon space. So, I create a new K2 Item called “My Message”, upload the audio mp3 to my amazon space—let's say it's at files.amazon.com/my_message.mp3—then in the K2 Item, I Add an Attachment. See my image and let me know if I'm thinking correctly about this.
Attachments:

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum