Exemple #1
0
 def copyFile(self, link):        
     link = _qstr(link)
     if link.isEmpty():
         return
     url = QUtils.getGoodUrl(link)
     if url.isValid():
         dst = self.getPathToFolder(Editor.FILES_FOLDER)
         make_dir_if_not_exist(dst) 
         url = copy_file(unicode(url.toString(), 'utf-8')[7:], dst)
         
         return {"url":url, "name": get_name(url)}
Exemple #2
0
 def copyImage(self, path):
     return copy_file(path, self.getPathToFolder(Editor.IMG_FOLDER))