javascriptwechat-miniprogrammpesa

Mpesa Mini Program Pdf choose from gallery issue


i am trying to upload a pdf in mini program studio i am able to choose image using from gallery

my.chooseImage({ count: 1, success: (res) => { console.log(res); }, });

console of above code is

apFilePaths: ["https://resource/apml670e637a119d9fac0d058e05f48ec13b.jpg"]

but i am not able to find any way of selecting pdf from gallery if i try to fetch pdf using chooseImage it return this

apFilePaths: ["https://resource/apmla02211d90601062735fa0962063f59a6.null"]

Is there any way of choosing pdf or documents in Mpesa Mini program


Solution

  • IOS is not allow to upload file ,it only can upload picture and video form gallery .So the app and mini-program cloud not do it yet. Maybe you can try to use api "chooseMessageFile".But it only choose file from wechat cache file.