Author Topic: Open attachment directly -- not thru new window  (Read 4485 times)

Offline mr_serge

  • Newbie
  • *
  • Posts: 5
Open attachment directly -- not thru new window
« on: January 10, 2008, 06:50:23 AM »
Hi there!
I use Roundcube almost since the beginning of this project, but due to some other issues I haven't been in forum for a while and so I made a new profile (just because I even wasn't able to restore my old account). The feature I was asking for since the beginning:

Please, can you please make it possible to simply «Save Target As...» for attachments and remove fancy feature of opening in new window? Now it's only possible to do that if you click on attachment, open new window and then click on [download] link in «File name file.pdf [download]» line.

But it is very useless to open such files as PDF in new window, download all file info in browser and then download file again to use it on your computer. And as for me -- I am graphic designer and usually I receive and send very big files and each time if I need to wait two times for each attachment it get me sick.

Even more -- there is a lot of bugs with displaying attachments with this «New window preview» feature -- my friend, for example, are not able to see my PDF files just because she runs IE and I'm not able to tell her to install Firefox or so on -- we just want things work and use them.

Thank you for your work and I hope you my opinion will mean something in contribution of this excellent webmail client.

Offline oldschool

  • Sr. Member
  • ****
  • Posts: 406
Re: Open attachment directly -- not thru new window
« Reply #1 on: January 10, 2008, 10:25:13 PM »
For me it will save the pdf as pdf.htm???????
So whats wrong???
 :o

Thanx alot.

Rgds.


Offline mr_serge

  • Newbie
  • *
  • Posts: 5
Re: Open attachment directly -- not thru new window
« Reply #2 on: January 17, 2008, 01:42:36 PM »
Shure it will be like "save as html". Just because it's not possible to directly the attachment, you should it before saving open in new window. That's what my request is about.
Please, someone from developement team, please do reply on this forum thread. Maybe someone know the workaround for this feature or at least can tell -- why this kind of "feature" was distributed in the beginning?

Offline jordao

  • Newbie
  • *
  • Posts: 4
Re: Open attachment directly -- not thru new window
« Reply #3 on: January 17, 2008, 06:56:07 PM »
Hi.

Everytime i click on attachments to open them, roundcube returns only strange and senseless text (see example image).

The following errors are writen onto the errors file in the log directory:
Code: [Select]
[16-Jan-2008 01:58:13] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/jordao/public_html/cubo/config/main.inc.php:1) in /home/jordao/public_html/cubo/program/include/main.inc on line 76
[16-Jan-2008 01:58:13] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/jordao/public_html/cubo/config/main.inc.php:1) in /home/jordao/public_html/cubo/program/steps/mail/get.inc on line 64
[16-Jan-2008 01:58:13] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/jordao/public_html/cubo/config/main.inc.php:1) in /home/jordao/public_html/cubo/program/steps/mail/get.inc on line 65
[16-Jan-2008 01:58:13] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/jordao/public_html/cubo/config/main.inc.php:1) in /home/jordao/public_html/cubo/program/steps/mail/get.inc on line 66
[16-Jan-2008 01:58:13] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/jordao/public_html/cubo/config/main.inc.php:1) in /home/jordao/public_html/cubo/program/steps/mail/get.inc on line 67
[16-Jan-2008 01:58:13] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/jordao/public_html/cubo/config/main.inc.php:1) in /home/jordao/public_html/cubo/program/steps/mail/get.inc on line 72
[16-Jan-2008 01:58:13] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/jordao/public_html/cubo/config/main.inc.php:1) in /home/jordao/public_html/cubo/program/steps/mail/get.inc on line 73
[16-Jan-2008 01:58:13] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/jordao/public_html/cubo/config/main.inc.php:1) in /home/jordao/public_html/cubo/program/steps/mail/get.inc on line 111
Can anyone please help me, because i can't view or download any type of attachments

Offline mr_serge

  • Newbie
  • *
  • Posts: 5
Re: Open attachment directly -- not thru new window
« Reply #4 on: January 25, 2008, 05:50:10 AM »
Is there anyone from developement team who can just write few words on this issue so I could understand your position on current issue? Please.

Offline TomC

  • Jr. Member
  • **
  • Posts: 10
Re: Open attachment directly -- not thru new window
« Reply #5 on: March 31, 2008, 04:23:08 AM »
I wonder, if anybody from the development team really reads these postings?

I agree strongly with what mr_serge writes: The new window when trying to open the attachments is a pain.

It would be very helpful if someone could post a workaround?!

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,385
Re: Open attachment directly -- not thru new window
« Reply #6 on: March 31, 2008, 05:39:08 AM »
Do you have a blank line at the end of one of your config files? all the header allready sent errors would suggest you do.

If RC can't send the headers the attachemnt viewing/downloadign wont work right.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline TomC

  • Jr. Member
  • **
  • Posts: 10
Re: Open attachment directly -- not thru new window
« Reply #7 on: April 01, 2008, 04:07:49 AM »
@JohnDoh: Please read mr_serge's initial posting. Its not about php warnings, etc, its just about the fact that we don't like RC to open a new window when the users clicks on an attachment link.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,385
Re: Open attachment directly -- not thru new window
« Reply #8 on: April 01, 2008, 06:51:36 AM »
sorry, i was responding to jordao.

to stop the preview window i think you have to do this (sorry i cant test it at the moment)...

look for
Code: [Select]
// open attachment in frame if it's of a supported mimetype
if (this.env.uid && props.mimetype && find_in_array(props.mimetype, this.mimetypes)>=0)

in program/js/app.js, its line 717 in 0.1-stable i think.

and replace it with
Code: [Select]
// open attachment in frame if it's of a supported mimetype
if (false)
or comment out the whole if block.

that will stop the popup window code from ever running and it should skip to the download redirect at the bottom i think.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline jordao

  • Newbie
  • *
  • Posts: 4
Re: Open attachment directly -- not thru new window
« Reply #9 on: April 01, 2008, 07:50:59 AM »
Quote from: JohnDoh
Do you have a blank line at the end of one of your config files? all the header allready sent errors would suggest you do.

If RC can't send the headers the attachemnt viewing/downloadign wont work right.

1000 thanks JohnDoh.

It worked perfectly !!!

Offline teddy86

  • Newbie
  • *
  • Posts: 5
Open attachment directly -- not thru new window
« Reply #10 on: May 23, 2008, 06:27:30 PM »
yeah, attachments should opaen directly as a download. not in a new window.

i have got the same problem as jordao (header already sent) i checked the config files main.inc.php and db.inc.php in the config folder. the error still occurs, even without any blank lines in the end of my config files.

does anybody has an idea how to fix this problem?

Offline mike

  • Newbie
  • *
  • Posts: 3
Open attachment directly -- not thru new window
« Reply #11 on: May 30, 2008, 06:25:01 AM »
Quote from: JohnDoh;11274
sorry, i was responding to jordao.

to stop the preview window i think you have to do this (sorry i cant test it at the moment)...

look for
Code: [Select]
// open attachment in frame if it's of a supported mimetype
if (this.env.uid && props.mimetype && find_in_array(props.mimetype, this.mimetypes)>=0)


in program/js/app.js, its line 717 in 0.1-stable i think.

and replace it with
Code: [Select]
// open attachment in frame if it's of a supported mimetype
if (false)

or comment out the whole if block.

that will stop the popup window code from ever running and it should skip to the download redirect at the bottom i think.


Many thanks .. this save my day

Offline mike

  • Newbie
  • *
  • Posts: 3
Open attachment directly -- not thru new window
« Reply #12 on: May 30, 2008, 06:36:32 AM »
Quote from: teddy86;12191
yeah, attachments should opaen directly as a download. not in a new window.

i have got the same problem as jordao (header already sent) i checked the config files main.inc.php and db.inc.php in the config folder. the error still occurs, even without any blank lines in the end of my config files.

does anybody has an idea how to fix this problem?


try this:

delete "?>" in every configfile

look at the error
"PHP Warning: Cannot modify header information - headers already sent by (output started at /home/jordao/public_html/cubo/config/main.inc.php:1) ..."

check the file main.inc.php