Re-using attachments

swatme

Well-known member
ok im on xf 1.2
i suggest to have a re-use of attachment files

example:
you upload an image attachment on thread named "my beautiful wife"
so its now ok...
now you realize, you also need to post the same picture in another thread named "sexy wife".

instead of reuploading the same file which consumes space, why not reuse it instead?
Code:
[attach]123456[/attached]


currently if you just copy "image file url" and use img tag
it will only show when your login, but for unregistered it will
not show the thumbnail.

i hope image reuse is avaialble
 
Upvote 16
What I have done on my forum is to edit the bb_code_tag_attach template so that attach codes can be viewed in any post.

Instructions:

1) Delete contents of bb_code_tag_attach template
2) Add the following code to the bb_code_tag_attach template

Code:
<img src="{xen:link attachments, $attachment}" alt="{$attachment.filename}" class="bbCodeImage LbImage" />
 
Hello!

I have the same "problem" .. o_O
In a post I have those shiny little flags showing.. I want to copy/paste the list and thus use the attachments to other threads..

flags1.webp --> flags2.webp


But I just can copy the code and it's not working like it "should" ;)
I know @AndyB posted what seems like a solution but it's too complicated for me.. or maybe I need some more explanations.. :oops:
 
Our community LOVES to upload and share pictures. We've found that our members will upload their favorite image and keep inserting it over and over and over again throughout the forum over the course of weeks, months, even years!

In two of the platforms I currently use, a member can retrieve an image they have already uploaded and reuse / reinsert that image. Here are some screenshots:

EXAMPLE 1:
upload_2013-8-21_17-14-48.webp



EXAMPLE 2:
upload_2013-8-21_17-14-53.webp

Again, in both systems a user can browse through the past images they've uploaded and reinsert them into their future posts.

This saves hosting space and improves the user's experience.

It would be great to see this as a feature on xF!
 
Our community LOVES to upload and share pictures. We've found that our members will upload their favorite image and keep inserting it over and over and over again throughout the forum over the course of weeks, months, even years!

The main problem with doing this is that if the one post that is associated with an attachment is deleted, all the other posts that used that attachment number become dead images, potentially ruining dozens of threads.

It's best in my opinion that members don't reuse attachments, disk space is very inexpensive.
 
Thanks Andy! I guess I didn't know that images were so intricately tied to individual posts. I guess I just (wrongly?) assumed images were independent of posts?

Ok, so just to clarify: If I upload an image to a post, the copy the image URL to another location, on or off-site, and delete the post, the images are deleted as well?
 
There is an addon that does this already -

http://xenforo.com/community/resources/attachment-viewer.411/

Works fine in 1.2.1 its -

1) Adds a link in your profile drop down to view all your previous attachments
2) Allows you to copy the URL and reinsrt as an image not attachment

Pretty cool addon and works flawlessly with 1.2.1
Don't like it. A faster, more convenient way to look for past attachments without having to go to a different page is more convenient. A pop-up would be better.
 
Don't like it. A faster, more convenient way to look for past attachments without having to go to a different page is more convenient. A pop-up would be better.

You can do that yourself with this addon just add the link to the page that it creates, stick it in an I-Frame or whatever suits your needs.

Do agree though a button on the reply box would be great to link to your attachments and re use them.

If I am not mistaken the whole problem with reusing attachments is due to permissions?

Again depends on your needs as well, our site is a travel based forum so users have 1000's of images and this addon allows them to browse there attachments, filter by forum get the image / s they want to reuse and repost them.
 
It's best in my opinion that members don't reuse attachments, disk space is very inexpensive.

Disk space may be cheap but for instance on my site we have 6gb's of attachments for 10k+ attachments which is not much but backing that up to an offsite location can be a pain so reducing that by any size possible is a big plus.
 
The main problem with doing this is that if the one post that is associated with an attachment is deleted, all the other posts that used that attachment number become dead images, potentially ruining dozens of threads.

It's best in my opinion that members don't reuse attachments, disk space is very inexpensive.
Would be best of XenForo could detect how many places X attachment was. So if it was used in 5 places and I deleted 1 of them (the original for example), it would still remain in the other 4 places.

I'm sure this can be done somehow.

Needless to say.... I support the idea of re-using attachments. I know 1 site where almost 1/2 of their space used is basically the same "silly" photo posted over & over again. They would save about 5 GB if it was as simple as re-using it.
 
Disk space may be cheap but for instance on my site we have 6gb's of attachments for 10k+ attachments which is not much but backing that up to an offsite location can be a pain so reducing that by any size possible is a big plus.

I have over 325,000 attachments on my forum. Off-site backup takes a few minutes at most using rsync.
 
What I have done on my forum is to edit the bb_code_tag_attach template so that attach codes can be viewed in any post.

Instructions:

1) Delete contents of bb_code_tag_attach template
2) Add the following code to the bb_code_tag_attach template

Code:
<img src="{xen:link attachments, $attachment}" alt="{$attachment.filename}" class="bbCodeImage LbImage" />

Andy, it's WONDERFUL.
Thanks a lot.
 
You can do that yourself with this addon just add the link to the page that it creates, stick it in an I-Frame or whatever suits your needs.

Do agree though a button on the reply box would be great to link to your attachments and re use them.

If I am not mistaken the whole problem with reusing attachments is due to permissions?

Again depends on your needs as well, our site is a travel based forum so users have 1000's of images and this addon allows them to browse there attachments, filter by forum get the image / s they want to reuse and repost them.
This does what I want: http://xenforo.com/community/resources/wmtech-attachment-manager.1364/
 
Last edited:
Disk space may be cheap but for instance on my site we have 6gb's of attachments for 10k+ attachments which is not much but backing that up to an offsite location can be a pain so reducing that by any size possible is a big plus.

look into rsync for your backups. After the first full sync, it will only transfer what has changed after that.
 
Top Bottom