1
嗨,大家好,我正在使用ostrio:文件包,我想在服務器端插入圖像並獲取圖像ID以輸入我的其他數據。但我無法找到上的圖像插入到collectoin在服務器端Meteor Ostrio:文件服務器端圖像插入
嗨,大家好,我正在使用ostrio:文件包,我想在服務器端插入圖像並獲取圖像ID以輸入我的其他數據。但我無法找到上的圖像插入到collectoin在服務器端Meteor Ostrio:文件服務器端圖像插入
流星檔案文檔從服務器上傳文件的任何文件 - 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使用。
謝謝你,我看到了功能,但在流星中弄錯了路徑。我想下次我會用jalik:ufs軟件包,因爲它看起來更簡單 – Potato