RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AJAX upload progress bar

File sharing script

File mirror script

Newsletter script
is it possible to add sitename to filename after download?

 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XFileSharing Pro
View previous topic :: View next topic  
Author Message
hscorp



Joined: 12 Nov 2008
Posts: 143

PostPosted: Jan 01, 2009 5:57 pm    Post subject: is it possible to add sitename to filename after download? Reply with quote

the file name for example is

test.zip

when u download it the script renames it to

sitename.com_test.zip
Back to top
View user's profile Send private message Visit poster's website
PilgrimX182



Joined: 22 Mar 2006
Posts: 2109
Location: UFO Lab

PostPosted: Jan 12, 2009 10:19 am    Post subject: Reply with quote

In index.cgi find
Code:
$file->{fsize} = $ses->makeFileSize($file->{file_size});

and add below:
Code:
$file->{file_name} = "sitename.com_$file->{file_name}";
Back to top
View user's profile Send private message Visit poster's website
hscorp



Joined: 12 Nov 2008
Posts: 143

PostPosted: Jan 12, 2009 4:05 pm    Post subject: Reply with quote

thanks for your reply but it doesn't work

when i choose file to download for example as this pic



you'll go to this page to create the link and the file will be with sitename like this picture



but after you'll get the link without sitename




but really thanks for your reply wating if there is any solution
Back to top
View user's profile Send private message Visit poster's website
PilgrimX182



Joined: 22 Mar 2006
Posts: 2109
Location: UFO Lab

PostPosted: Jan 13, 2009 2:02 pm    Post subject: Reply with quote

oh, then undo the change I've told you and do this:
in fs.cgi find
Code:
$filename=~s/[^\w\d\.-]/_/g if $c->{sanitize_filename};

and add below:
Code:
$filename = "sitename.com_$filename";


this should update filename everywhere.
Back to top
View user's profile Send private message Visit poster's website
hscorp



Joined: 12 Nov 2008
Posts: 143

PostPosted: Jan 13, 2009 5:23 pm    Post subject: Reply with quote

yea this works fine with newly uploaded files

but two problems

1- what about already uploaded files?
2- what if i changed the domain name or i want to remove it.

Very Happy thanks
Back to top
View user's profile Send private message Visit poster's website
PilgrimX182



Joined: 22 Mar 2006
Posts: 2109
Location: UFO Lab

PostPosted: Jan 14, 2009 7:24 am    Post subject: Reply with quote

What if godzilla will raise again? Smile

1) No idea what's the problem you mean.
2) Then change domain there too or remove it. It's FREE QUICK hack, what do you want else?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XFileSharing Pro All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group