Currently filename is always empty so downloading to with "save link as" or when name of the file cannot be inferred from url dont work. Chrome sets filename ot in oncreated but in first onchanged. This code waits for filename to be set before download. Additionaly added semicolons to prettier and ignored error with deleting file that is not finished downloading.
Currently filename is always empty so downloading to with "save link as" or when name of the file cannot be inferred from url dont work. Chrome sets filename ot in oncreated but in first onchanged. This code waits for filename to be set before download. Additionaly added semicolons to prettier and ignored error with deleting file that is not finished downloading.