Unfortunately, the username and password you have entered do not match!

Registration

Unfortunately, this username is already taken!

Unfortunately, this e-mail address is already used!

Please retype the verification code.

All fields are required

File renaming of uploaded files

Welcome, Guest
Username Password: Remember me

File renaming of uploaded files
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: File renaming of uploaded files

File renaming of uploaded files 1 year, 5 months ago #11234

  • mlb24usc
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
RS Form Pro has always added a prefix to file names once they are uploaded using the built in upload component. There was a fix to preserve the original file name that worked up until 1.3.0:

Original code in functions.php file:
 
// todo - customize prefix
$timestamp = uniqid('');
// todo - handle files through joomla
move_uploaded_file($tmp_name[$i],$dest[$i].$timestamp.'-'.$name[$i]);
@chmod($dest[$i].$timestamp.'-'.$name[$i],0644);
$file = $dest[$i].$timestamp.'-'.$name[$i];
 


Fix to diable file renaming:
 
// todo - handle files through joomla
move_uploaded_file($tmp_name[$i],$dest[$i].$name[$i]);
@chmod($dest[$i].$name[$i],0644);
$file = $dest[$i].$name[$i];
 


The folder / file structure has changed with 1.3.0 and I have yet to figure out how to prevent the renaming of files. Has anyone figured out a solution on how to preserve the original file name? Thanks!

Re:File renaming of uploaded files 1 year, 5 months ago #11235

  • mlb24usc
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
I've managed to figure this one out. The file that needs to be edited is located at ./administrator/components/com_rsform/helpers/rsform.php. Scroll down to line 1172 and delete $prefix. The line when completed should read.
 
$file = $realpath.$files['form']['name'][$fieldName];
 


Hope this helps somebody.

Re:File renaming of uploaded files 6 hours, 1 minute ago #0

Hello,
This is an automatically generated message.
We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you wish to receive our support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here: http://www.rsjoomla.com/support-policy.html.

Thank You!
PLEASE NOTE: This topic is NOT locked and you can add replies to it. Other users are free to reply as well. This message has been generated by a bot and has no effect on the topic whatsoever.
  • Page:
  • 1
Moderators: alex, alexp, octavian, bogdanc, andreic
Time to create page: 1.27 seconds
Feedback