Side Scripting for a custom upload button

General conversation about our product. Get help with your 'How To' questions.
Post Reply
Saber123
Posts: 1
Joined: Wed Jun 13, 2018 3:40 pm

Side Scripting for a custom upload button

Post by Saber123 » Wed Jun 13, 2018 3:51 pm

Clients connect to TSPlus using a URL. We are aware that there is a dropdown menu at the top of the screen that allows users to upload files. What we would like to do is somehow use the custom.js file to create something that would allow us to call the same upload functionality but from within a microsoft access database. The database would be accessed from within a browser connection to Tsplus with the setting that all urls are opened on the client side.
We would also like to be able to have different access databases open different upload forms so that we could customize the look of the upload form with the clients logo. Also, we would like the upload form to open as a popup in front of the current window the same way that the upload popup appears when you click the upload button on the tsplus dropdown at the top of screen.

Please let me know if this is possible and how I could do it.

juwagn
Site Admin
Posts: 231
Joined: Wed Oct 15, 2014 8:25 pm

Re: Side Scripting for a custom upload button

Post by juwagn » Sun Sep 02, 2018 1:52 pm

Hello,

since TSplus 11.50.8.27 popup file upload was disabled, now when you click in top menu on upload button you will get displayed the browsers/systems native file choice menu to lower the amount of steps (which has no option to be styled since not html related).
You can disable that direct file choice menu opening by
www\software\html5\settings.js > W.avoidDirectFileOpenDialog = true;
(by default this variable is not present inside settings.js)
However despite of that there is no way to style these popups.

Additionally to that change it is now possible if supported by browser to execute these commands to open file choice menu as privileged action if it arrives right at time from server to browser (during ~1 second time frame). Usually such privileged commands were rejected by browsers popup blocker.

(Also popup opening and file choice menu opening are both privileged actions on browser level and must be executed from mouse click or at least during 1 second time frame in setTimeout called by that click, however IE doesn't accept privileged actions from setTimeout so this browser will fail anyway)

I have attached file file_picker.zip with additional readme.txt inside for next steps.

Sincerely yours, JW.
Attachments
file_picker.zip
(4.49 KiB) Downloaded 417 times
TSplus HTML5 and Java web engineer

spmnemrc
Posts: 61
Joined: Sat Mar 04, 2017 3:00 pm

Re: Side Scripting for a custom upload button

Post by spmnemrc » Thu Oct 11, 2018 4:48 pm

I cannot wait to test this. I have to update my server first.

Post Reply