I recently encountered a problem in creating a micro-website on the public platform, that is, uploading images. inputfile seems to have problems with Android phones. Some mobile phones cannot select images, it is even more strange that the uploaded images cannot be uploaded to the server. You can use the mobile browser. You have tried the webupload diagram before... I recently encountered a problem in creating a micro-website on the public platform, that is, uploading images. The input file seems to be faulty for Android phones. Some mobile phones cannot select images, even more strange, the upload of images is not sent to the server. You can use a mobile browser. You have tried uploading webupload images before. This plug-in is not compatible with this plug-in, after some Android phones upload images, they become an unknown file on the server, so they gave up. Recently, the jssdk mentioned Image Upload, preview, and other interfaces, not long after the development, how to implement these interfaces is still under research. Do you have any similar requirements.
Reply content:
I recently encountered a problem in creating a micro-website on the public platform, that is, uploading images. The input file seems to be faulty for Android phones. Some mobile phones cannot select images, even more strange, the upload of images is not sent to the server. You can use a mobile browser. You have tried uploading webupload images before. This plug-in is not compatible with this plug-in, after some Android phones upload images, they become an unknown file on the server, so they gave up. Recently, the jssdk mentioned Image Upload, preview, and other interfaces, not long after the development, how to implement these interfaces is still under research. Do you have any similar requirements.
Take a moment to read the document. You do not need to consider compatibility when uploading images in your jssdk. (It may even help users compress images)
Probably as follows: After jssdk successfully uploads an image, a server id is returned.
Then go to the multimedia download interface. It is called media id, which is actually the server id in js. With this id, you can get your image.
What you need to do is submit the server id to the server in js. Then you can receive it on the server and use the Multimedia Interface.
Jssdk demo: https://github.com/wjfz/weixin-jssdk I have called
@ The Madman said that it is indeed a good way to live,
At that time, we guided the user to go to the window for upload and obtain it in the background,
On the page, the user can display all the images within 30 minutes for the user to choose from.
Another method is to guide the user to open in the browser.
However, we recommend the crazy method.
@ Crazy, this idea is not feasible. First, the Multimedia Interface needs to authenticate the service number, not the background number. In fact, the frequency of uploading and downloading through the Multimedia Interface is limited. It is definitely not suitable for uploading images to websites.
How can I upload images from a store? It seems that the provided interface cannot be uploaded and the error code =-1 is returned.