Skip to content

Commit d3426e5

Browse files
committed
try to fix playwright
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
1 parent 63e4ddc commit d3426e5

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/views/Results.vue

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -786,16 +786,18 @@ export default defineComponent({
786786
},
787787
788788
async onDownloadFile(nextFileFormat: SupportedFileFormat): Promise<void> {
789-
const exportUrl =
789+
const url = new URL(
790790
generateOcsUrl('apps/forms/api/v3/forms/{id}/submissions', {
791791
id: this.form.id,
792-
})
793-
+ '?requesttoken='
794-
+ encodeURIComponent(getRequestToken() ?? '')
795-
+ '&fileFormat='
796-
+ nextFileFormat
792+
}),
793+
window.location.origin,
794+
)
795+
url.searchParams.set('requesttoken', getRequestToken() ?? '')
796+
url.searchParams.set('fileFormat', nextFileFormat)
797797
798-
window.open(exportUrl, '_self')
798+
const link = document.createElement('a')
799+
link.href = url.toString()
800+
link.click()
799801
},
800802
801803
async onLinkFile(): Promise<void> {

0 commit comments

Comments
 (0)