[pgAdmin4][runtime]: Download feature in runtime - Mailing list pgadmin-hackers

From Neel Patel
Subject [pgAdmin4][runtime]: Download feature in runtime
Date
Msg-id CACCA4P2eP9URRcHXXiPftxodmV_da57pjSw9PKLgpjEHjrb6MQ@mail.gmail.com
Whole thread Raw
Responses Re: [pgAdmin4][runtime]: Download feature in runtime  (Dave Page <dpage@pgadmin.org>)
List 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.


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

pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: Fix for issue RM1336 [pgadmin4]
Next
From: Murtuza Zabuawala
Date:
Subject: Re: PATCH: to fix jsonb type rendering in runtime (pgAdmin4)