×
Kunena 5.1.18 Released (30 Jun 2020)

The Kunena team has announce the arrival of Kunena 5.1.18 [K 5.1.18] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1.

× Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question Attachments with spaces in filenames overwrite previous uploaded attachments

More
8 years 4 months ago - 8 years 4 months ago #1 by wincash
Hi

I m using Kunena 1.7.2 on Joomla 2.5.1 and i have a problem with attachment file in kynena

The problem appears when a user upload a file whith a space in the name (ie "sans titre.png") the file is automaticly renammed in "sanstitre.png"... No problem for the first upload, but when someone upload an other file nammed "sans titre.png" the file was rename in sanstitre.png and replace the old one. Seems there is no check if it exist or not...

But if you don't use space in the name file, all was ok and the file was carrectly renammed...

If was a "big" problem because by default files was nammed "sans titre.*" in some (french) application
Sure i ash to user to don't use name whith space but... :)

let me show you :)

first file call sans titre.jpg

renamed in sanstitre.jpg
normally it was a white one in a red square.
Attachments:
Last edit: 8 years 4 months ago by wincash.

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

More
8 years 4 months ago - 8 years 4 months ago #2 by wincash
and if i upload another one different (blue)


sans titre.jpg was rename in sanstitre.jpg too (without checking if an other one exist) and the attachement in the previously post change too

(hope you have the problem too :)

update

Yeah( sorry :) ) you have the problem too

if i send you the same file without space (i change name too ) you have :

save in orignal name "attachement.png
rename correctly in attachement_2012-03-24-2.png

hope you can fixed it

best regards
Attachments:
Last edit: 8 years 4 months ago by wincash.

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

More
8 years 4 months ago #3 by sozzled

wincash wrote: Hope you can fixed it

Fix what, exactly? Everything is working fine. Your examples prove that everything is working fine. I'm sorry. I don't understand the problem.

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

More
8 years 4 months ago - 8 years 4 months ago #4 by wincash
I will try, with my poor english to explain :)

If you send a attachment call "sans titre.jpg", the script will rename in "sanstitre.jpg"
no problem with that

But if, in an other post, you link a new attachement with the same name "sans titre.jpg" (with the space)
The second attachement will already renamed in "sanstitre.jpg".. and will replace the 1st attachement.

and you have finally the 1er post, with the attachement of the second one
The secong post have a correct attachement until somebody use the same name (with space) for his attachement and, with the third post, the attachement of post 1 and post 2 will replace by the attachement of the post 3 etc etc etc...

the case is only when you use a file name attachement with a space in the name..


please try to send different file called "sans titre.jpg" in several post an d you will show it...;)

The solution was, to check if a file exist whith the same name but without space to renamed it correctly or to "lock" upload attachement with a space

Now you have :
1 post : sans titre.jpg -> sanstitre.jpg
2 post : sans titre.jpg -> sanstitre.jpg

and you normally will have
1 post : sans titre.jpg -> sanstitre.jpg
2 post : sans titre.jpg -> sanstitre-03-27-12.jpg (or something like that (like other file in fact)


rgds
Last edit: 8 years 4 months ago by wincash.

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

More
8 years 4 months ago #5 by sozzled
I understand the issue. I will report this to the development team to make sure that it's fixed in K 2.0.

In the meantime, don't use image filenames that contain spaces. Simple. Problem solved. ;)

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

More
8 years 4 months ago - 8 years 4 months ago #6 by cleweb
"n the meantime, don't use image filenames that contain spaces. Simple. Problem solve"

Be sure that's i asked to my user when i saw the problem

thanks
Last edit: 8 years 4 months ago by cleweb.

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

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 1.164 seconds