[pgAdmin4][runtime]: Download feature in runtime

From: Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: [pgAdmin4][runtime]: Download feature in runtime
Date: 2016-06-30 09:42:31
Message-ID: CACCA4P2eP9URRcHXXiPftxodmV_da57pjSw9PKLgpjEHjrb6MQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi,

Please find attached patch file for initial version of download file in
runtime application.

With this patch, we have implemented two features.

*Feature 1 :- Normal "Download file" from runtime application*

Previously "Download file" was not implemented in runtime application.
With this patch file, we have handled Qt signal for download file properly.

*Feature 2 :- "download" attribute support for 'a' tag for client side
download*

As per our knowledge, webkit has not implemented the download attribute at
'a' tag.
Currently it shows under development from below link.

https://bugreports.qt.io/browse/QTBUG-47732

We did not found any signal in Qt for download attribute feature but to
implement this feature in runtime application, we added one workaround to
make it work with download CSV file.

When we click on download buttons, we are getting Qt signal
"urlLinkClicked" and in that url we are finding "data:text/csv" from
encoded URL generated from sqleditor. Once we found that tag then we are
decoding the csv data and writing to file.

Is that right approach ? Should we add our own custom mime-type to header ?
Let us know your thoughts on this feature.

Please review it and let us know comments.

Thanks,
Neel Patel

Attachment Content-Type Size
download_runtime.patch application/octet-stream 12.1 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Murtuza Zabuawala 2016-06-30 10:37:03 Re: PATCH: to fix jsonb type rendering in runtime (pgAdmin4)
Previous Message Dave Page 2016-06-30 09:04:55 Re: Fix for issue RM1336 [pgadmin4]