我目前正在使用reactjs在flux架構上構建一個應用程序。如何在ReactJS中使用cloudinary?
我試圖使用cloudinary
節點(npm安裝)來處理圖片上傳,但當我嘗試調用上傳功能時,出現錯誤post_request.setTimeout() is not a function
。
我一直在一個問題上停留一段時間了,並會感謝任何指針。提前致謝。
我做什麼
npm install cloudinary
import cloudinary from 'cloudinary'
cloudinary.config(params)
cloudinary.uploader.upload(image_url, callback)
從文檔,我應該能夠調用cloudinary.uploader.upload(file, callback, options)
其中文件是文件名或圖像URL
日誌給錯誤post_request.setTimeout() is not a function
我會很感激任何提示,可以幫助用這個上傳。提前致謝。
你解決了嗎? –