Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-17 12:53:35

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

file names when downloading

Does anyone know how it’s possible to mantain file names in file download? I.e., to download like on the manfre site: http://manfre.net/file_download/22/mem_online_users.txt, instead of http://manfre.net/file_download/22.txt.

Maybe I’m missing something?… :)

Thanks!

Z-

Offline

#2 2008-04-17 13:12:11

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: file names when downloading

Maybe I’m missing something?

You are, as Textpattern doesn’t change filenames.

Offline

#3 2008-04-17 13:14:46

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: file names when downloading

Zanza,
downloads are mantaining the original names for me.
Maybe you are using an older version of txp?
Or it has to do with permlinks mode (mine are set to section/title)?
Or it’s caused by the upm_file plugin I’m using?

Last edited by redbot (2008-04-17 13:17:55)

Offline

#4 2008-04-17 13:20:46

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: file names when downloading

Zanza,
downloads are mantaining the original names for me.
Maybe you are using an older version of txp?
Or it has to do with permlinks mode (mine are set to section/title)?
Or it’s caused by the upm_file plugin I’m using?

You just need clean urls aka modrewrite and that’s it. If you’re using messy, then you can build the url directly to the file with the filename aka:

http://rahinaa.biz/files/rah_comments_v0.2.txt
http://rahinaa.biz/file_download/9/rah_comments_v0.2.txt
http://rahinaa.biz/file_download/9/

Offline

#5 2008-04-17 14:10:05

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: file names when downloading

Uhm… you’re right and I’m dumb.

The best part is that in a site of mine this is already working (but haven’t checked for a while…)…

I don’t know where my idea came from. I was sure to remember some old advice telling that txp changed the name in number to avoid two files with the same name… Maybe it’s a false memory, but since then I was convinced that this was a limitation of txp!

Thank you guys!

Z-

Offline

Board footer

Powered by FluxBB