- Posts: 28
COMMUNITY FORUM
Understanding how updating 'attachments' works
- nick
-
Topic Author
- Offline
- Junior Member
Less
More
8 years 8 months ago #157368
by nick
Understanding how updating 'attachments' works was created by nick
I sell files online and use K2store. K2store uses the K2 attachment as the file to sell, so I need to understand what K2 does with attachments because I have to update all the files.
What is the best way to update existing files but still have them available to existing purchasers so they can download the new file:
1. Delete the old file and replace it with the new file using the same name
2. Delete the old file and replace it with a new file using a new name
3. Upload the new file with a new name, but keep the old file as well
4. Another suggestion
Any help to understand how K2 references attachments would be greatly appreciated.
Thanks, Nick
What is the best way to update existing files but still have them available to existing purchasers so they can download the new file:
1. Delete the old file and replace it with the new file using the same name
2. Delete the old file and replace it with a new file using a new name
3. Upload the new file with a new name, but keep the old file as well
4. Another suggestion
Any help to understand how K2 references attachments would be greatly appreciated.
Thanks, Nick
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 8 months ago #157375
by Krikor Boghossian
Replied by Krikor Boghossian on topic Understanding how updating 'attachments' works
If I understand correctly you are selling digital files and you have multiple versions.
I would approach this a bit different.
Since the new attachments by default are placed on the bottom of the list. Use the attachment's title to clearly state the version or the release's info. When you publish a new version there would be no need to remove the old file.
You can also use the "Link title attribute (optional)" (<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>) field in your template in order to display more info on that release.
I would approach this a bit different.
Since the new attachments by default are placed on the bottom of the list. Use the attachment's title to clearly state the version or the release's info. When you publish a new version there would be no need to remove the old file.
You can also use the "Link title attribute (optional)" (<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>) field in your template in order to display more info on that release.
Please Log in or Create an account to join the conversation.
- nick
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 28
8 years 8 months ago #157380
by nick
Replied by nick on topic Understanding how updating 'attachments' works
Thank you Krikor.
Your suggestion is similar to my number 3 option.
There is one detail I left out. When someone buys a file (with K2Store), that file can automatically be emailed to the buyer (there is an option to also download the same file).
If there are two files (the original file and the new file) which of the files will be made available to the buyer for emailing? If as you suggest,
Your suggestion is similar to my number 3 option.
There is one detail I left out. When someone buys a file (with K2Store), that file can automatically be emailed to the buyer (there is an option to also download the same file).
If there are two files (the original file and the new file) which of the files will be made available to the buyer for emailing? If as you suggest,
then the original file will be emailed, not the new file. Is that correct?new attachments by default are placed on the bottom of the list
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 8 months ago #157384
by Krikor Boghossian
Replied by Krikor Boghossian on topic Understanding how updating 'attachments' works
This is specific to K2 Store.
I do not know the exact specifics of this extension - content wise at least.
You need to contact the extension's developer about this question.
I do not know the exact specifics of this extension - content wise at least.
You need to contact the extension's developer about this question.
Please Log in or Create an account to join the conversation.
- nick
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 28
8 years 8 months ago #157405
by nick
Replied by nick on topic Understanding how updating 'attachments' works
Thank you.
In that case to keep things simple, I will delete the original file and replace it with the new one.
Does it matter what I name the new file? For example does K2 need exactly the same name to reference the new file correctly, or does K2 find the correct attachment no matter what the name is?
In that case to keep things simple, I will delete the original file and replace it with the new one.
Does it matter what I name the new file? For example does K2 need exactly the same name to reference the new file correctly, or does K2 find the correct attachment no matter what the name is?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 8 months ago #157412
by Krikor Boghossian
Replied by Krikor Boghossian on topic Understanding how updating 'attachments' works
If you delete the file and create a new attachment, then a new link will be created.
For the sake of clarity (and maintenance) you can use the same filename as before but the link will be created none the less.
The tricky part is, that I do not know how K2Store treats attachments and digital files and their associations.
For the sake of clarity (and maintenance) you can use the same filename as before but the link will be created none the less.
The tricky part is, that I do not know how K2Store treats attachments and digital files and their associations.
Please Log in or Create an account to join the conversation.