code100x/cms

bug: Invalid Certificate being downloaded

Closed this issue · 4 comments

currently If we attempt to download the Certificate before its generated, then it still downloads a png which is corrupt since the it was downloaded before generating

bug2.mov

Steps to reproduce the behavior:

  1. go to /certificate endpoint
  2. download the certificate before it appears
    (enable throttle to fast/slow 3g to reproduce if you have very good internet)

Expected behavior
Waits for the certificate to be generated and then downloads it

  • Browser: chrome
  • Version 125.0.6422.113 (Official Build) (arm64)

we can disable the download button until the certificate is generated ?

we can disable the download button until the certificate is generated ?

this was my first solution but its not the best one since its just some seconds before the certificate is generated and responding to users action after the generation is done is better than disabling the button itself

we can disable the download button until the certificate is generated ?

this was my first solution but its not the best one since its just some seconds before the certificate is generated and responding to users action after the generation is done is better than disabling the button itself

Here is another workaround

  1. manage one more state ( to cache the user action)
  2. let the user click the button and update user action state if certificate is still being generated otherwise let it be downloaded
  3. if certificate was being generated when the user clicked the button, change button state to generating certificate and download the certificate (actual download action) once it's generated

we can disable the download button until the certificate is generated ?

this was my first solution but its not the best one since its just some seconds before the certificate is generated and responding to users action after the generation is done is better than disabling the button itself

Here is another workaround

  1. manage one more state ( to cache the user action)
  2. let the user click the button and update user action state if certificate is still being generated otherwise let it be downloaded
  3. if certificate was being generated when the user clicked the button, change button state to generating certificate and download the certificate (actual download action) once it's generated

already implemented something like this and made a pr here #766