You are here: Foswiki>Tasks Web>Item14055 (31 Jan 2018, PhilippeKehl)Edit Attach

Item14055: attachment's size attribute is wrong if beforeUploadHandler changes it

pencil
Priority: Normal
Current State: Closed
Released In: 2.1.1
Target Release: patch
Applies To: Engine
Component: FoswikiUIUpload
Branches: master Release02x01 Item14033 Item13897 Item14380 Item14537
Reported By: PhilippeKehl
Waiting For:
Last Change By: PhilippeKehl
-- PhilippeKehl - 24 Apr 2016

When uploading a file Foswiki calls Foswiki::Meta::attach() with the option "filesize" set to the original file size.

Plugins can however modify the content in their beforeUploadHandler and change the file size (according to the API docu in Foswiki::Plugins::EmptyPlugin). Foswiki::Meta::attach() does not take that into account.

-- PhilippeKehl - 24 Apr 2016

Pull request filed that fixes this: https://github.com/foswiki/distro/pull/8

-- PhilippeKehl - 24 Apr 2016
 
Topic revision: r10 - 31 Jan 2018, PhilippeKehl
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy