upload_3_3.py 498 B

12345678910111213
  1. def fixFilename(self, action, new_name):
  2. ns = amiweb.session()['upload_ns']
  3. if action == 'change':
  4. if model.Files.countFilesWithFilename(new_name):
  5. ns['filename'] = filename
  6. ns['new_filename'] = model.Files.newFilename(filename)
  7. return render("skeletonz/plugins/upload/view/upload_already_found.tmpl", ns)
  8. ns['filename'] = new_name
  9. #Else let is stay the same
  10. del amiweb.session()['upload_ns']
  11. return self.uploadComplete(ns)