Opened 3 years ago
Last modified 7 months ago
#12493 new enhancement
Filter $bits in wp_upload_bits()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | XML-RPC | Version: | 3.0 |
| Severity: | normal | Keywords: | has-patch mobile |
| Cc: | ercoli@… |
Description
It'd be nice if there was a filter on $bits in wp_upload_bits() to allow plugins to modify uploads coming in from XML-RPC. Resizing, watermarking, etc. are all example uses for this filter.
Since it's a simple filter, perhaps it could be slipped into 3.0.
Attachments (2)
Change History (8)
Viper007Bond — 3 years ago
comment:1
Viper007Bond — 3 years ago
comment:2
follow-up:
↓ 3
josephscott — 3 years ago
If we are going to do this have you looked at adding a corresponding filter for uploads done via AtomPub?
comment:3
in reply to:
↑ 2
Viper007Bond — 3 years ago
Replying to josephscott:
If we are going to do this have you looked at adding a corresponding filter for uploads done via AtomPub?
AtomPub uses wp_upload_bits() too, doesn't it?
comment:4
Viper007Bond — 3 years ago
I have thoroughly tested this tonight via XML-RPC and it works awesome. I don't have an AtomPub client though, but I don't see why it wouldn't work as it's the same kinda thing.
comment:5
daniloercoli — 7 months ago
- Keywords mobile added
comment:6
daniloercoli — 7 months ago
- Cc ercoli@… added

To clarify, yes this can be done after the file is saved to the filesystem, but then the thumbnails must be regenerated and the meta data updated. A big hassle.