You are here: Foswiki>Tasks Web>Item14055 (11 Aug 2016, 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
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: r8 - 11 Aug 2016, PhilippeKehl - This page was cached on 23 Sep 2017 - 16:38.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License