In general, you can't override methods of objects created by the LR SDK, unfortunately.
Any way in which I can achieve this functionality :- Giving Dialog box when x is called to confirm if i really want to cancel.
Here is what i ve tried now.
progressScope:setCancelable(false) -- Dosen't seem to work
if progressScope:isCanceled() then
local response = LrDialogs.confirm("Do you want to cancel upload ?","Click Yes to cancel the rest of the upload. Else click No","Yes, cancel upload","No, don't Cancel")
if(response == "ok") then
Is the progressScope coming from exportContext:configureProgress()? If not, where?