File field improvements
Gosling Cools
Junior Lid
Posts: 20
9 jaren 7 maanden geleden - 9 jaren 7 maanden geleden #698
door Gosling Cools
File field improvements werd gestart door Gosling Cools
Make file extension lower case (for all those .JPG files!)
Add the second line to your table/your-item.php
A current file might exist, if so delete it. Else you will end up with lots of files that don't get deleted.
After this line:insert:Hope this is of any use
Add the second line to your table/your-item.php
$filename[0] = preg_replace("/[^A-Za-z0-9]/i", "-", $filename[0]);
$filename[1] = strtolower($filename[1]);
A current file might exist, if so delete it. Else you will end up with lots of files that don't get deleted.
After this line:
if(!JFile::exists($uploadPath)){
if($array['id'] != 0)
{
// do a db query on this current item to get the current filename
// delete this file from the server
}
Laatst bewerkt 9 jaren 7 maanden geleden door Gosling Cools.
De volgende gebruiker (s) zei dank u: Andres Maeso, Juanjo vazquez real, RIP Graphics
Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.
logic
Nieuw lid
Posts: 2
8 jaren 3 maanden geleden #1401
door logic
Beantwoord door logic in topic File field improvements
i am facing following error when i try to save file filed
Error
Save failed with the following error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select FROM #__pdfperfectuploader_ WHERE id = 0' at line 1 SQL=SELECT select FROM #__pdfperfectuploader_ WHERE id = 0
Error
Save failed with the following error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select FROM #__pdfperfectuploader_ WHERE id = 0' at line 1 SQL=SELECT select FROM #__pdfperfectuploader_ WHERE id = 0
Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.
Tijd voor maken pagina: 0.047 seconden