File name for broker return


Jackson, Adam
 

Hi,

 

We have a broker program that opens documents stored in database of a sister app. So far all fine but when I use it to open a xlsx document it opens excel with the correct content but the file name is “mgrqispi.xls” not the file name of the document.

 

How it works is

 

As I said the file opens fine – it is just getting he filename in excel to be as intended. Is this possible and if so what do I need to do?

 

TIA

 

Xpa 2.5D

 

Adam

 

Adam

Jackson

Senior Manager, Operations and Digital Systems

T  +447949892482

 

E  adam.jackson@...

McLaren Formula 1 Team

McLaren Technology Centre

Chertsey Road, Woking

Surrey, GU21 4YH, UK

mclaren.com

Facebook

Instagram

LinkedIn

Twitter

YouTube

 

The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
McLaren Racing Limited, McLaren Technology Centre, Chertsey Road, Woking, Surrey, GU21 4YH, UK. Company Number: 01517478


Jackson, Adam
 

Same behaviour for Word too

 

Adam

Jackson

Senior Manager, Operations and Digital Systems

T  +447949892482

E  adam.jackson@...

McLaren Formula 1 Team

 

 

From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Jackson, Adam via groups.io
Sent: 12 August 2022 10:42
To: magicu-l@groups.io
Subject: [magicu-l] File name for broker return

 

CAUTION: This email originated from outside of McLaren. Do not click links or open attachments unless you recognise the sender and know the content is safe. Report any suspicious emails using the 'Report Phishing Email' button in Outlook.

 

Hi,

 

We have a broker program that opens documents stored in database of a sister app. So far all fine but when I use it to open a xlsx document it opens excel with the correct content but the file name is “mgrqispi.xls” not the file name of the document.

 

How it works is

 

As I said the file opens fine – it is just getting he filename in excel to be as intended. Is this possible and if so what do I need to do?

 

TIA

 

Xpa 2.5D

 

Adam

 

Adam

Jackson

Senior Manager, Operations and Digital Systems

T  +447949892482

 

E  adam.jackson@...

McLaren Formula 1 Team

McLaren Technology Centre

Chertsey Road, Woking

Surrey, GU21 4YH, UK

mclaren.com

Facebook

Instagram

LinkedIn

Twitter

YouTube

 

The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
McLaren Racing Limited, McLaren Technology Centre, Chertsey Road, Woking, Surrey, GU21 4YH, UK. Company Number: 01517478


Callum Downie
 

Hi Adam, Unless there is a trick I am not aware of I don't think you are able to set the file name when you send it through the requester like this.

Another option would be to create the file on the o/s and return a page that downloads it, but then you are at the users browser settings mercy as to whether it auto opens or not and you have files on the o/s to clean up...  so not ideal either... 

I take it this is not an RIA application? And the user is just accessing it from a browser?

On Fri, 12 Aug 2022, 8:05 pm Jackson, Adam, <adam.jackson@...> wrote:

Same behaviour for Word too

 

Adam

Jackson

Senior Manager, Operations and Digital Systems

T  +447949892482

E  adam.jackson@...

McLaren Formula 1 Team

 

 

From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Jackson, Adam via groups.io
Sent: 12 August 2022 10:42
To: magicu-l@groups.io
Subject: [magicu-l] File name for broker return

 

CAUTION: This email originated from outside of McLaren. Do not click links or open attachments unless you recognise the sender and know the content is safe. Report any suspicious emails using the 'Report Phishing Email' button in Outlook.

 

Hi,

 

We have a broker program that opens documents stored in database of a sister app. So far all fine but when I use it to open a xlsx document it opens excel with the correct content but the file name is “mgrqispi.xls” not the file name of the document.

 

How it works is

 

As I said the file opens fine – it is just getting he filename in excel to be as intended. Is this possible and if so what do I need to do?

 

TIA

 

Xpa 2.5D

 

Adam

 

Adam

Jackson

Senior Manager, Operations and Digital Systems

T  +447949892482

 

E  adam.jackson@...

McLaren Formula 1 Team

McLaren Technology Centre

Chertsey Road, Woking

Surrey, GU21 4YH, UK

mclaren.com

Facebook

Instagram

LinkedIn

Twitter

YouTube

 

The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
McLaren Racing Limited, McLaren Technology Centre, Chertsey Road, Woking, Surrey, GU21 4YH, UK. Company Number: 01517478


Steve Greenfield
 

Hi Adam,

 

Just a long shot – I think you can use RqHTTPHeader to set the filename as well as the file type? Also does Blob2Req give a different result?

 

Check out this thread……

https://magicu-l.groups.io/g/main/message/109432?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2CRqHTTPHeader%2C20%2C2%2C0%2C3894421

 

 

Best Regards

 

Steve Greenfield

 

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Callum Downie
Sent: 12 August 2022 12:16
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] File name for broker return

 

Hi Adam, Unless there is a trick I am not aware of I don't think you are able to set the file name when you send it through the requester like this.

 

Another option would be to create the file on the o/s and return a page that downloads it, but then you are at the users browser settings mercy as to whether it auto opens or not and you have files on the o/s to clean up...  so not ideal either... 

 

I take it this is not an RIA application? And the user is just accessing it from a browser?

 

On Fri, 12 Aug 2022, 8:05 pm Jackson, Adam, <adam.jackson@...> wrote:

Same behaviour for Word too

 

Adam

Jackson

Senior Manager, Operations and Digital Systems

T  +447949892482

E  adam.jackson@...

McLaren Formula 1 Team

 

 

From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Jackson, Adam via groups.io
Sent: 12 August 2022 10:42
To: magicu-l@groups.io
Subject: [magicu-l] File name for broker return

 

CAUTION: This email originated from outside of McLaren. Do not click links or open attachments unless you recognise the sender and know the content is safe. Report any suspicious emails using the 'Report Phishing Email' button in Outlook.

 

Hi,

 

We have a broker program that opens documents stored in database of a sister app. So far all fine but when I use it to open a xlsx document it opens excel with the correct content but the file name is “mgrqispi.xls” not the file name of the document.

 

How it works is

  • open URL https://<servername> /magicscripts/mgrqispi.dll?APPNAME=<app name>&prgname=imAttachment&ARGUMENTS=-N53270,-Atasks.xlsx
  • broker program takes two arguments and interrogates database to return blob, filename and content type
  • blb2file using the blob and filename from database to a common location
  • RqHTTPHeader('Content-type: '&Trim(J)) where J is a virtual usually updated with content type from database but for xlsx this is overwritten with 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  • File2Req(Trim(E)) where E = common location + filename from database as above

 

As I said the file opens fine – it is just getting he filename in excel to be as intended. Is this possible and if so what do I need to do?

 

TIA

 

Xpa 2.5D

 

Adam

 

Adam

Jackson

Senior Manager, Operations and Digital Systems

T  +447949892482

 

E  adam.jackson@...

McLaren Formula 1 Team

McLaren Technology Centre

Chertsey Road, Woking

Surrey, GU21 4YH, UK

mclaren.com

Facebook

Instagram

LinkedIn

Twitter

YouTube

 

The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
McLaren Racing Limited, McLaren Technology Centre, Chertsey Road, Woking, Surrey, GU21 4YH, UK. Company Number: 01517478


 

Add a header like this:
RqHTTPHeader('Content-Disposition: attachment; filename="tasks.xlsx"');





Jackson, Adam
 

Thank you – this worked

 

Adam

Jackson

Senior Manager, Operations and Digital Systems

T  +447949892482

E  adam.jackson@...

McLaren Formula 1 Team

 

 

From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Luuk via groups.io
Sent: 13 August 2022 08:44
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] File name for broker return

 

CAUTION: This email originated from outside of McLaren. Do not click links or open attachments unless you recognise the sender and know the content is safe. Report any suspicious emails using the 'Report Phishing Email' button in Outlook.

 

Add a header like this:
RqHTTPHeader('Content-Disposition: attachment; filename="tasks.xlsx"');



 

The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
McLaren Racing Limited, McLaren Technology Centre, Chertsey Road, Woking, Surrey, GU21 4YH, UK. Company Number: 01517478