user2608474
0
Q:

python html trasfertwise upload file

import os 
  
fileitem = form['filename'] 
  
# check if the file has been uploaded 
if fileitem.filename: 
    # strip the leading path from the file name 
    fn = os.path.basename(fileitem.filename) 
      
   # open read and write the file into the server 
    open(fn, 'wb').write(fileitem.file.read()) 
0

New to Communities?

Join the community