这尤其与使用拖放功能创建的文件有关,但适用于任何上传的文件。是否可以使用工作流程或脚本创建命名约定,例如{internalID}+{date}
,以便自动命名所有上载的文件,以引用它们附加的记录?
我使用此功能,只是将文件名作为参数发送
函数createfile(content,fileName){ var fileObj = null,
fileObj = file.create( {
name: fileName+ '.json',
fileType: file.Type.PLAINTEXT,
contents: content,
description: 'TEST FILE .JSON',
encoding: file.Encoding.UTF8,
folder: 57,
isOnline: true
});
return fileObj.save();
}