- Posts: 3
COMMUNITY FORUM
Image md5 issue with K2 Upload
- Chris
-
Topic Author
- Offline
- New Member
Less
More
11 years 2 weeks ago #128148
by Chris
Image md5 issue with K2 Upload was created by Chris
Hi,
First time forum user :lol: as usual, I have a problem I am hoping to squeeze out of you experienced Joomla users.
I have K2 installed and we added a new category ages ago which is now having problems.
When I create a new article now and attempt to upload a new image, or from directory, one of the older images from the /media/k2/items/cache file appears when I save it.
I deleted everything from cache and tried to make a new article and it took the upload fine. Second article, same all fine.
Put the older contents of the cache folder back in and same issue.
Whats weird is that the MD5 in the name for the older files, matched some of the new uploads exactly, I was under the impression they were automatically generated based on the filename and the ID.
Any takers?
First time forum user :lol: as usual, I have a problem I am hoping to squeeze out of you experienced Joomla users.
I have K2 installed and we added a new category ages ago which is now having problems.
When I create a new article now and attempt to upload a new image, or from directory, one of the older images from the /media/k2/items/cache file appears when I save it.
I deleted everything from cache and tried to make a new article and it took the upload fine. Second article, same all fine.
Put the older contents of the cache folder back in and same issue.
Whats weird is that the MD5 in the name for the older files, matched some of the new uploads exactly, I was under the impression they were automatically generated based on the filename and the ID.
Any takers?
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
Less
More
- Posts: 8743
11 years 2 weeks ago #128149
by Lefteris
Replied by Lefteris on topic Re: Image md5 issue with K2 Upload
Hi. As you correctly said the md5 is generated based on the item id. So if you have truncated the database manually using SQL you will have new items with IDs from old items.
Please Log in or Create an account to join the conversation.
- Chris
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 3
11 years 2 weeks ago #128150
by Chris
Replied by Chris on topic Re: Image md5 issue with K2 Upload
Thanks for your reply, Lefteris
I see, that could be my issue then.
Would anyone know of a way to make the MD5/filename completely random every time?
I see, that could be my issue then.
Would anyone know of a way to make the MD5/filename completely random every time?
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
Less
More
- Posts: 8743
11 years 2 weeks ago #128151
by Lefteris
Replied by Lefteris on topic Re: Image md5 issue with K2 Upload
If you make it completely random the K2 will not know which image belongs to which item. There is no need to do this. If you don't hack your database the images will never get mixed.
Please Log in or Create an account to join the conversation.
- Chris
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 3
11 years 1 week ago #128152
by Chris
Replied by Chris on topic Re: Image md5 issue with K2 Upload
I see :) unfortunately the "little hacks" we make, are necessary.
So will need to think of a better way.
Never mind, thanks for your help :D
So will need to think of a better way.
Never mind, thanks for your help :D
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
Less
More
- Posts: 8743
11 years 1 week ago #128153
by Lefteris
Replied by Lefteris on topic Re: Image md5 issue with K2 Upload
I am sure that there is a way to do what you need without hacks... Anyway, you are welcome.
Please Log in or Create an account to join the conversation.