简体   繁体   English

最佳文件上传方式

[英]Best file upload approach

So, what do you guys recommend to start off from in order to achieve the functions below? 那么,为了实现以下功能,你们建议从什么开始?

  1. Multiple image file upload 多个图像文件上传
  2. Resize(compression) images 调整(压缩)图像大小
  3. Upload them via ajax (automatically) even before the form is submitted. 即使在提交表单之前,也可以通过ajax(自动)上传它们。
  4. First image is the "main" featured image, and others are given custom post meta 第一张图片是“主要”特色图片,其他图片则是自定义帖子元素
  5. For multiple images, there are radio buttons which users can choose which one becomes the main image. 对于多个图像,有单选按钮,用户可以选择哪个成为主图像。
  6. Once form is submitted, any changes (if user changes the main image) will be updated. 提交表单后,将更新任何更改(如果用户更改主图像)。

I tried to build something from scratch but it is taking too much time. 我试图从头开始构建一些东西,但这花费了太多时间。

在此输入图像描述

Any suggestions will be much appreciated. 任何建议将不胜感激。

  1. My way: 我的方式:
    • 1.Use plugin for multiple ajax upload 1.使用多个ajax上传的插件
    • 2.Plugin for resizing images 2.用于调整图像大小的插图
    • 3.Change main image trough ajax 3.通过ajax改变主图像

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM