can someone assist me how to do this
when an image is uploaded by a user, it will be named by the same file name
but i want it automatically add text to the file name
for example
"cat.jpg" will be changed to "mysite cat.jpg"
or at least tell me which file to look for
i do know a little programming
thanks
Posts: 1
I have been having the same problem, and I haven't been able to find an answer. Have you found anything in another forum or blog?
-Steve
[url]www.american-chimney.com[/url]
Posts: 8339
modules/itemadd
ItemAddFromServer.inc
ItemAddFromWeb.inc
look to function addItem
$fileName = basename($file);
$title = ($textFields['title']) ? $base : '';
if you use a different method like uploadify look for its itemAdd file
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 6
sorry for the delay
could't find those exact lines in itemaddfromweb
i actually alrdy found these before but wut i did is
$title = (isset($form['set']['title']) && $form['set']['title']) ? $base : '';
under that add this line
$title = 'mysite.com' + $title;
and these code
if ($getFileName) {
if (!empty($headers['Content-Disposition'])
&& preg_match('/filename="(.*?)"/', $headers['Content-Disposition'], $match)) {
$fileName = 'mysite.com' + $match[1]; <----
} else if (!empty($urlComponents['path'])) {
$fileName = basename($urlComponents['path']);
$fileName = 'mysite.com' + $fileName; <-----
} else {
$fileName = basename($url);
$fileName = 'mysite.com' + $fileName; <------
}
the arrow is just indicate where i made the change
tested, nothing changed