Loading…
📚
apifm
Frontend PaaS & AI Dev Platform
Homepage
Open Source
SDK
Cases
Contact
Backend management
File upload and management
File upload and management
Help documentation
Update anytime
Table of contents on this page
Select local album/camera
Cloud development upload files
Backend management
# Select local album/camera ```javascript tt.chooseImage({ success(res) { this.setData({ images: res.tempFilePaths // This is needed for uploading images for subsequent cloud development, please save it. }); }, fail(res) { console.log(`chooseImage call failed`); } }); ``` # Cloud development upload files ```javascript const res = await TTAPI.uploadFile(tempFilePath) // tempFilePath is res.tempFilePaths returned after selecting the picture above console.log(res) //Interface return ``` Return example of res: ```json { "code": 0, "data": { "msg": "SUCCESS", "originalName": "73b3dedc75be71738454542d29c0b594.png", "size": "569099", "name": "cuser/951/2020/01/03/f641e7c9-adae-41b1-96eb-df356b8c385f.png", "type": ".png", "url": "https://dcdn.it120.cc/cuser/951/2020/01/03/f641e7c9-adae-41b1-96eb-df356b8c385f.png" }, "msg": "success" } ``` #Backend management 