| View previous topic :: View next topic |
| Author |
Message |
hscorp
Joined: 12 Nov 2008 Posts: 143
|
Posted: Jan 01, 2009 5:57 pm Post subject: is it possible to add sitename to filename after download? |
|
|
the file name for example is
test.zip
when u download it the script renames it to
sitename.com_test.zip |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2109 Location: UFO Lab
|
Posted: Jan 12, 2009 10:19 am Post subject: |
|
|
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 |
|
 |
hscorp
Joined: 12 Nov 2008 Posts: 143
|
Posted: Jan 12, 2009 4:05 pm Post subject: |
|
|
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 |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2109 Location: UFO Lab
|
Posted: Jan 13, 2009 2:02 pm Post subject: |
|
|
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 |
|
 |
hscorp
Joined: 12 Nov 2008 Posts: 143
|
Posted: Jan 13, 2009 5:23 pm Post subject: |
|
|
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.
thanks |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2109 Location: UFO Lab
|
Posted: Jan 14, 2009 7:24 am Post subject: |
|
|
What if godzilla will raise again?
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 |
|
 |
|