Quantcast
Viewing all articles
Browse latest Browse all 1619

Extension Writers Discussion • Adding data to what's submitted by posting.php

My extension is a photo uploader. In posting_layout_include_panel_body.html I am successfully uploading the images and it's pretty slick:

Image may be NSFW.
Clik here to view.
Image


However, users have found that when they press Preview or Save Draft all the already uploaded photos and metadata is lost.

I'm trying to find the best way to ensure it gets persisted when Preview or Save Draft is pressed and reloaded.

I figured I could add a hidden input field like this:

Code:

<!-- hidden input field to the form to track uploaded files, for when Preview is pressed --><input type="hidden" name="uploaded_files" id="uploaded-files-field" value="">
But "submit" on Preview or Save Draft is not passing that on so when the page gets reloaded it's empty.

So that seems like a dead end.

I'm wondering if there's some way of explicitly adding to the post data?

Suggestions? Thanks.

Statistics: Posted by tig_ — Fri Jan 17, 2025 10:50 pm



Viewing all articles
Browse latest Browse all 1619

Trending Articles