我创建了一个文件的副本,名称为A.pdf,B.pdf,C.pdf(具有不同名称的相同文件)。 在我将这些文件上传到常规之后,所有文件都显示为同名。 (A.pdf,A,pdf,A.PDF)
我在Evernote网络应用程序中检查过这个。
答案 0 :(得分:0)
要更改Evernote中显示的文件名(以及下载时),请使用note属性对象并将fileName
属性设置为文件名。然后通过将资源对象的attributes
属性设置为ResourceAttribute对象,将noteAttribute对象附加到资源。
Python中的示例:
import evernote.edam.type.ttypes as Types
#create the resource object
resource = Types.Resource()
resource.data = data
#get the hash to reference in ENML
hash_hex = binascii.hexlify(fileHash)
#write note contents
note.content = '<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><br/>Excel File:<en-media type="application/excel" hash="' + hash_hex + '"/></en-note>'
#create Resource Attribute Object
ra = Types.ResourceAttributes()
ra.fileName = "report.xlsx" #set the filename you wish to appear in the note
ra.attachment= True
#attach the resource attribute object to the resource object
resource.attributes = ra
note.resources = [resource] # Now, add the new Resource to the note's list of resources