Recently in the public platform to do micro-site, which encountered a difficulty, that is the picture upload, input file on the Android phone seems to have a problem, some phones can not choose pictures, more strange upload images uploaded into the server, mobile browser can, before trying webupload pictures upload, Because of this plug-in compatibility is not good, Android part of the mobile phone upload image into an unknown format file exists server, and then gave up, recently released JSSDK inside has mentioned pictures upload, preview and other interfaces, due to contact development soon, these interfaces how to implement is still in the study, No one has ever done a similar demand.
Reply content:
Recently in the public platform to do micro-site, which encountered a difficulty, that is the picture upload, input file on the Android phone seems to have a problem, some phones can not choose pictures, more strange upload images uploaded into the server, mobile browser can, before trying webupload pictures upload, Because of this plug-in compatibility is not good, Android part of the mobile phone upload image into an unknown format file exists server, and then gave up, recently released JSSDK inside has mentioned pictures upload, preview and other interfaces, due to contact development soon, these interfaces how to implement is still in the study, No one has ever done a similar demand.
Take the time to look at the document, your own jssdk inside the picture upload without regard to compatibility and so on. (It may even compress the image for the user)
Probably as follows: Jssdk the uploaded image will return a server ID when successful.
Then go to the multimedia download interface. It's called the media ID, which is actually the server ID in JS. Take this ID to get the user's picture.
All you have to do is to submit the server ID to the server in JS. It is then received on the server and is done through the multimedia interface.
I've been jssdk demo:https://github.com/wjfz/weixin-jssdk.
@ It's really a good idea to live with a madman.
We were the Guide users to the window upload, background access,
Then to the page, the user within 30 minutes of the pictures are displayed, for the user to choose.
Another way is to guide the user to open in the browser.
But the way to recommend lunatics.
@ Crazy Live This idea is not good, the first multimedia interface needs authentication Service number, not the background number can be used. In fact, the multimedia interface upload download has a frequency limit, used as a site image upload method is certainly not appropriate.
How to upload the picture of the store, you know? As if the supplied interface could not be uploaded back to Errorcode=-1