1
我创建了一个带有几个字段的表单,比如“标题”,“日期”,“textarea”和用PLupload上传照片的选项。创建一个带有多张照片上传(PLupload)的表单
但是,上传表单并将照片附加到我的数据库中的正确帖子的最佳方式是什么?
我现在的方法是,当点击保存按钮:
function save() { // javascript function
// step 1. do an empty jquery post, so I get a (database) ID of my new post
// step 2. start PLupload upload, with as parameter the ID from step 1 (using multipart_params in PLupload)
// step 3. when PLupload is ready, update the form with the complete content (title, date, textarea.
}
但是这种方法是一个简单的形式有点复杂。我正在寻找更简单的方法。我怎样才能做到这一点?