Commit graph

13 commits

Author SHA1 Message Date
Sam Reed
baf83f74b8 More explicit variable definitions, function documentation 2011-02-20 13:33:42 +00:00
Bryan Tong Minh
db544af120 $wgMaxUploadSize may now be set to an array to specify the upload size limit per upload type.
Backwards compatible, if not set to an array, applies to all uploads. If set to an array, per upload type maximums can be set, using the file and url keys. If the * key is set this value will be used as maximum for non-specified types.
2011-01-06 19:42:55 +00:00
Sam Reed
03e4248def Properly qualify usage of class constants 2010-12-22 00:25:16 +00:00
Neil Kandalgaonkar
902995cb1d core changes for UploadWizard (merged from r73549 to HEAD in branches/uploadwizard/phase3) 2010-11-03 04:32:41 +00:00
Alexandre Emsenhuber
2d078552de * Standardised file description headers
* Added some descriptions
* Added @file where needed
2010-08-20 20:39:04 +00:00
Bryan Tong Minh
b4310925ba Follow-up r70037: Fix ApiUpload by passing a WebRequestUpload to the the initializer
Follow-up r64403 and r69911: Fix broken upload from stash in Api. 

Please tests your commits, even if the change seems totally harmless. You can use <http://mwclient.svn.sourceforge.net/viewvc/mwclient/tests/upload_api_test.py?revision=HEAD&view=markup> to automatically test uploading via the Api.
2010-07-27 21:53:52 +00:00
Bryan Tong Minh
b62d5dbad7 Follow-up r70037: Move isIniSizeOverflow magic to WebRequestUpload 2010-07-27 20:54:34 +00:00
Bryan Tong Minh
546a55a79d (bug 23380) Uploaded files that are larger than allowed by PHP now show a useful error message.
Introduced a WebRequestUpload class which is a wrapper around $_FILES and contains all getUpload* and getFile* methods. This has as advantage that the upload can be passed along without $wgRequest. Also because I like objects.
2010-07-27 20:38:36 +00:00
Tim Starling
008f1ee491 Fixed severe breakage of non-JS upload, presumably introduced in the 1.16 upload rewrite. If the user doesn't enter a destination filename, it's meant to use the name of the source file. Untested code "$wgRequest->getText('wpUploadFile')" did not work, you need to fetch from $_FILES not $_REQUEST. Code to propagate the relevant default to UploadForm was missing, readded here.
Apologies for the nodata hack, but I want to backport this to 1.16, so I don't want to make any HTMLForm.php changes if I can avoid it.
2010-05-27 07:30:34 +00:00
Michael Dale
9e4c1bd7a5 * added missing initialize function to UploadFromFile ( avoids the initialized undefined error ) 2010-02-17 05:43:50 +00:00
Mark A. Hershberger
c386434108 follow-up r62164 2010-02-10 09:59:02 +00:00
Bryan Tong Minh
c2033042ee * Code style & commenting on upload functions.
* Move isValidURI from UploadFromUrl to HttpFunctions.
* Made some functions in UploadBase static.
2009-08-26 17:05:24 +00:00
Michael Dale
aefc40d749 here it is ... the upload-api, script-server, js2 (javascript phase2) branch merge 1st attempt.
Here is a short overview of changes and associated default configuration variables (most everything is off by default) also see ~soon to be updated~: http://www.mediawiki.org/wiki/Media_Projects_Overview

= Upload Improvements =
==Upload API ==
* Based on the early work of Bryan Tong and others it adds the upload option to the api.
* We rewrite Special:Upload page to include use the new refactoring
* Added in token checks in both the SpecialUpload.php page so avoids DOS / xss copy-by-url JavaScript based cross site POST file submissions

== Copy by URL==
$wgAllowCopyUploads = false;
* http class rewrite includes a new http background download see: includes/HttpFunctions.php

* spins off a php process that calls: maintenance/http_session_download.php
* pushes updates to the session and gives the user a progress bar on http copy uploads from other server progress (using js2 upload interface) (if not using the js2 upload interface it does the request in-place but the download is limited to the php ini timeout time)

== Firefogg ==
* Firefogg enables resumable upload by chunks
* progress indicators and conditional invokation (js2 system)
* and of-course client side transcoding.

= Script Server =
$wgEnableScriptLoader = false;
* off by default if $wgEnableScriptLoader is turned on script files are grouped, gziped, cached etc.
for more info see: http://www.mediawiki.org/wiki/Extension:ScriptLoader

* Includes some early skin js include fixes (skin/script system still lots of love)
* Includes a "javascript class autoloader" this is packaged into mwEmbed so that the mwEmbed library can work in stand alone mode (while retaining localization and script serving) (one such application is the make page for firefogg.org : http://www.firefogg.org/make/index.html  )
* The file that contains the autojavascript loading classes is: js2/php/jsAutoloadLocalClasses.php
* One can use this auto class loading dependency system with extensions and add-ons but I need to better document that.

= js2 system  / mwEmbed=
$wgEnableJS2system = false

* includes initial rewrite towards more jquery based javascript code
* especially for the Special:Upload page.
* Also the edit page include support for the "add-media-wizard"
* includes dependency loader for javascript that optionally takes advantage of the script-loader
* remote embedding of javascript interfaces (like embedding video, or commons media searching)

* $wgDebugJavaScript = false; .. .this variable lets you always get "always fresh javascript". When used with the script-loader it does not minify the script-loader output.

= mwEmbed =
* Will commit a separate patch to oggHandler that conditionally outputs  <video tag> to use the new javascript video player.
** mv_embed player includes: play-head, volume control, remote embedding, oggz-chop support across plugins.
* add-media-wizard adds easy inserts of media to pages (with import)

== jQuery==
* we include a base install of jQuery, jQuery ui and some plugins.
* all the javascript classes are in the scriptloader so its easy to load any set of jquery ui components that you may need using the script-server. You get a callback so you can then execute js with dependencies loaded.

== other stuff ==
there is a bit more code in js2 that pertains to sequence editing, timed text display and basic image editing. We include a base import of pixastic-lib & pixastic-editor... will work with the pixastic developer to try and ensure upstream compatibility on our usage of the library for in-browser photo and sequence manipulation.
2009-07-14 23:52:14 +00:00