I’m simply trying to read the file name from the file_loader ‘wihout’ reading the extension through a button click. How can i do this?
Currently i’m reading the file name like this:
file = self.file_loader_1.file
name = file.name
And i’m getting the output “a.zip”. But i ‘only’ want to read a
from a.zip
I tried to remove .zip
through the python code on the click of a button on the server side like this:
print("BEFORE= " ,name)
name.replace('.zip', ' ')
print("AFTER= " ,name)
But it didn’t work. I got the following output:
BEFORE= a.zip
AFTER= a.zip
Clone link:
https://anvil.works/build#clone:36ZIQWEAVI3ZC4T7=VCBQ3O6XQUIYJCMGZJ7LAMLR