I need to change the filename (not the file, just the metadata of the name) when uploading to a sharepoint site.(上传到共享点站点时,我需要更改文件名(而不是文件,只是名称的元数据)。)
I figured that it would be easy enough to change the html attribute in javascript rather than playing with Sharepoint backend.(我认为更改javascript中的html属性比使用Sharepoint后端要容易得多。) So that when I upload a file it changes the name of the file (not the data)(这样,当我上传文件时,它会更改文件名(而不是数据))
something like this:(像这样的东西:)
function PreSaveAction(){
var file = document.GetElementById('fileupload1');
file.files[0].name='ChangedName.tmp'
return true;
}
Is this impossible due to the nature of the locked input='file' attributes?(由于锁定的input ='file'属性的性质,这是否不可能?)
ask by michael translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…