2016-11-26 40 views

回答

1

流星檔案文檔從服務器上傳文件的任何文件 - https://github.com/VeliovGroup/Meteor-Files/wiki/Write

Images.write(binaryData, { 
    fileName: 'something.png', 
    type: 'image/png', 
    meta: {owner: this.userId}, // or whatever you want to add 
}, (error, fileRef)=> { 
    // do stuff with fileRef 
}); 

另外值得一檢查出jalik:ufs一種替代包 - 積極維護,目前正在被RocketChat使用。

+0

謝謝你,我看到了功能,但在流星中弄錯了路徑。我想下次我會用jalik:ufs軟件包,因爲它看起來更簡單 – Potato