Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » How do I…?
  3. » Save As

#1 2013-04-13 02:06:17

DogLover
Member
Registered: 2013-04-04
Posts: 26

Save As

I am wanting to build the save as function into the download tag that Textpattern produces for me. How would I do this? Right now, it just opens the file in a new tab. I want it to pop up the save dialog box.

Thanks,
DogLover

Offline

#2 2013-04-13 14:50:28

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Save As

Isn’t that a browser setting?

Offline

#3 2013-04-13 15:38:09

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

Re: Save As

If it is a PDF file, you can put the following line in the .htaccess file:

AddType application/octet-stream .pdf

Offline

#4 2013-04-13 15:55:21

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,172
Website GitHub Mastodon Twitter

Re: Save As

GugUser wrote:

If it is a PDF file, you can put the following line in the .htaccess file: AddType application/octet-stream .pdf

That would just force the file to be downloaded right?

I think that the only way to save as might be to link to the actual url of the file. ie http://site.tld/files/filename.ext and do away with txp’s file system in the database. In my view txp’s system works just fine:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2013-04-13 18:22:32

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Save As

colak wrote:

I think that the only way to save as might be to link to the actual url of the file. ie http://site.tld/files/filename.ext and do away with txp’s file system in the database.

No, I don’t think so. In my browsers any /file_download/id link gives me the choice to open or save the file.

Edit: Well, that’s Firefox and Opera. Chrome just wants to save it…

Last edited by els (2013-04-13 18:28:32)

Offline

#6 2013-04-14 18:56:09

DogLover
Member
Registered: 2013-04-04
Posts: 26

Re: Save As

Ok, thanks for the ideas! The only file type I need to be saved as is .mp3’s. Also, I noticed that it works by default in IE10, but not in Firefox or Chrome. Any ideas?

Offline

#7 2013-04-14 21:54:14

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

Re: Save As

Put the following line in the .htaccess file:

AddType application/octet-stream .mp3

Last edited by GugUser (2013-04-14 21:54:46)

Offline

#8 2013-04-16 00:08:57

DogLover
Member
Registered: 2013-04-04
Posts: 26

Re: Save As

Where exactly would I put it in the .htaccess file?

Last edited by DogLover (2013-04-16 00:34:56)

Offline

#9 2013-04-16 00:44:05

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

Re: Save As

I put it at the end.

Offline

#10 2013-04-16 01:07:45

DogLover
Member
Registered: 2013-04-04
Posts: 26

Re: Save As

I tried that and it didn’t work.

Offline

  1. Index
  2. » How do I…?
  3. » Save As

Board footer

Powered by FluxBB