Requirements
- Provide the ‘Clone on update’ dialog for Media ( Attachments )
- Client should only need to send the attached file on the first clone request to a particular server
- Subsequent requests should not have to resend the file, unless the file has changed
- The file should be sent by an appropriate method
Solution
- In v0.6 the media file is attached as part of the AJAX request. See oik_clone_load_media_file()
- In v0.9 the media file will be passed as part of a multipart request
Current limitations
- The attached file is sent for each update
- The initial solution only works for small media files. The limit is determined in the server configuration. For some servers the maximum data that can be passed in a single POST request may be as low as 1MB.
- Does not support media files which have been moved during upload