Extension talk:UploadLocal/Archive

problem
test w/ 1.8.2, work! 22:41, 14 December 2006

Fatal error
I got always the problem that my browser won't start the wiki anymore with this message:

Fatal error: Undefined class name 'specialpage'

Any ideas? Is it my fault?

Thanks

Gerrit 10:22, 20 December 2006

one tiny suggestion
This works out great. Thank you. It is exactly what I was looking for!

One tiny thing I can think of is the warnings (before overwriting any files with same names, etc).

Because a batch of files are being uploaded you want to make sure that youre not messing up any other articles.

I wonder if this is an already existing option here that im not seeing.. 01:36, 18 January 2007

Other suggestion
Thank you for your work.

I think it's better to put the second file in the extensions directory instead of the include one and write on the first file on line 48 : SpecialPage::addPage( new SpecialPage( 'UploadLocal', 'uploadlocal',true,"wfSpecialUploadLocal","extensions/SpecialUploadClass.php" ) );

Epommate 15:01, 26 January 2007 (UTC)

Question
before i install and try this out - does it allow you to specify the page content and license for the images? 12:51, 26 July 2007

Removing Permissions
Is there any way to get this feature to work like Special:Upload, in that it only checks for membership before allowing the page to be used? I've switched to using IpbWiki, which handles permissions differently, and can't figure out how to make the two work together.

23:52, 28 July 2007

Help.
This is EXACTLY what I have. I have over 1 gig of audio files that I really don't want to upload again. I followed the steps exactly as described, but it stills ays that "Special:UploadLocal" is an undefined special page.

Any ideas? Hints? Help.... :S

Thanks.

--Sim

03:44, 8 October 2007

Hacky Fix for 1.11
Overwrite the UploadLocalForm class constructor with this:

20:16, 6 November 2007


 * These problems have been fixed in the latest release. Upgrade upgrade! &mdash; Edward Z. Yang (Talk) 23:47, 9 February 2008 (UTC)
 * I have the newest version and it does not work on 1.7.1 mediawiki, I get the error:
 * "The file you uploaded seems to be empty. This might be due to a typo in the file name. Please check whether you really want to upload this file."
 * I simply installed the older version again, and it works fine...thank you edward!
 * Odessaukrain 01:17, 9 May 2008 (UTC)

You did not upload any files.
I installed the extension complied with the procedure, however, I have this error message. Yet I see files.

Why? 08:35, 9 January 2008


 * Hi, it is likely that you are running an older version of MediaWiki. The most recent version of this extension is only known to work with 1.11. &mdash; Edward Z. Yang (Talk) 23:38, 9 May 2008 (UTC)

Problems with mediawiki version 1.11
After upgrading to mediawiki 1.11 every attempt to upload files with UploadLocal ends with

The file you uploaded seems to be empty. This might be due to a typo in the file name. Please check whether you really want to upload this file.

Does anybody experience the same problems?

Kind regards

Albert Cremer 17:15, 14 January 2008
 * Those who can read have a clear advantage over others;-) => The fix mentioned above solves the problem  08:47, 15 January 2008

Some files had errors
I am trying to upload a bunch of jpg images. When I run the tool I get these error messages:

Some files had errors - (Translated) The uploaded file appears to be empty. This could be a typo in the filename. Please check the file.

After changing the class constructor:

Some files had errors DSLMDB02099.jpg - (Translated) The uploaded file appears to be empty. This could be a typo in the filename. Please check the file. DSLMDB02100.jpg - (Translated) The uploaded file appears to be empty. This could be a typo in the filename. Please check the file. ... etc.

Version: * MediaWiki: 1.9.3 * PHP: 5.2.3 (apache) * MySQL: 5.0.51a

Is there a solution for this problem?

Kind regards,

Melvin Rook  10:18, 21 March 2008


 * Hi, the best solution is to use MediaWiki 1.11, otherwise, use an older version of the extension. &mdash; Edward Z. Yang (Talk) 23:39, 9 May 2008 (UTC)

emptyfile
Hi, i have the below error even after i installed Hacky Fix for 1.11 My Pictures.zip :

"The file you uploaded seems to be empty. This might be due to a typo in the file name. Please check whether you really want to upload this file."

Can any one help me? 15:57, 1 May 2008


 * Same problem here.


 * Me too. I have mediawiki 1.7. I simply installed the older version of this program (look at the September 2007 history on the main page), and it works fine...thank you edward for the great program!Odessaukrain 00:55, 9 May 2008 (UTC)

french translation
Hi, I have translated this extension in french so I put it there if anyone need it $messages = array(       'uploadlocal' => 'Envoyer des fichiers',        'uploadlocal_directory_readonly' => 'Le dossier d\'envoi local ($1) n\'est '.        ' pas accessible en ecriture sur le serveur.',        'uploadlocaltext' => 'Utilisez ce formulaire pour envoyer des fichiers qui sont déjà'.        ' dans le dossier du serveur. Vous pouvez en apprendre plus en allant sur'.        '  La page d\'envoi classique',        'uploadlocalbtn' => 'Envoyer des fichiers locaux',        'nolocalfiles' => 'Il n\'y a pas de fichiers dans le dossier.'.        ' essayez d\en mettre dans " ."',        'uploadednolocalfiles' => 'Vous n\'avez pas envoyé de fichiers.',        'allfilessuccessful' => 'Tout les fichiers ont bien été envoyés',        'uploadlocalerrors' => 'Certains fichiers ont eu des erreurs', 'allfilessuccessfultext' => 'Tous les fichiers ont bien été envoyés.Retourné à'. ' Accueil.', 'uploadlocal_descriptions_append' => 'Après la description : ', 'uploadlocal_descriptions_prepend' => 'Avant la description : ', 'uploadlocal_dest_file_append' => 'Après le nom des fichiers : ', 'uploadlocal_dest_file_prepend' => 'Avant le nom des fichiers : ', 'uploadlocal_file_list' => 'Fichiers prêt à être envoyés', 'uploadlocal_file_list_explanation' => '\'\'\'X\'\'\' indique'. ' si le fichiers doit être envoyé. '.       '  \'\'\'W\'\'\' indique si vous souhaitez avoir le fichier dans votre liste de suivi', 'uploadlocal_global_params' => 'Parametères globaux', 'uploadlocal_global_params_explanation' => 'Ce qui est rentré ici sera ajouter soit au début soit a la fin de la description et/ou du nom de fichier' ); --67.71.111.89 17:31, 4 July 2008 (UTC)

Blank page
When I navigate to Special:UploadLocal a blank page shows up. I did the hacky fix, I didn't change the default directory, I have the right permission, what is my problem?


 * I solved it, but if anyone has the same problem, at line three of /extensions/SpecialUploadLocal/UploadLocalForm.php i put require_once 'extensions/SpecialUploadLocal/SpecialUploadLocal.php'; instead of the default generated text that was saying require_once('SpecialUpload.php');

Rename Problem
I am getting this error, any suggestions?

Could not rename file "$IP/extensions/SpecialUploadLocal/data/Filename.jpg" to "public/c/c2/Filename.jpg".

You did not upload any file
when i attemp to upload some files i get this type of error and any of myfiles was upload.

does somebody help me?

Problem with file ownership
When using this extension with files not uploaded through the webserver somehow, and stored in a way that the webserver doesn't have ownership, this extension gives Warning: chmod [function.chmod]: Operation not permitted in /usr/share/mediawiki/includes/filerepo/FSRepo.php on line 347 during processing of the file list.

Mediawiki 1.13 - Failed opening required 'SpecialUpload.php'
See title. The extension tries to include SpecialUpload.php, and I don't know if I'm doing anything wrong, but it's not in the default include paths for me. Thus the include statement has to be changed to require_once('specials/SpecialUpload.php'); though there is probably a better way for this. The MediaWiki team changed the extension loading mechanism lately so that you only would have to load the bare minimum of things needed if you use the proper hooks. I think this extension now always includes the file, even if the functionality isn't needed at all.

Fix for 1.13 and some modifications
To make it work in 1.13:

Replace in UploadLocalForm.php with

---

Also I add a functionality to replace only small pictures (width < 250px). May be it would be useful for someone:

In file UploadLocalDirectory.php Insert after

following code:

Hope it helps. =)

ZF Turbo 08:22, 28 November 2008 (UTC)


 * I desperately needed this extension to work on a private MW 1.14 I manage. After I had checked the error log of the web server and found out that the extension searches the file SpecialUpload.php at the wrong directory, I came to the same workaround as you had a year ago. I've added the workaround to the extension page, so the next one who needs it, won't have to search too far. Dolev 19:30, 3 December 2009 (UTC)

Not a valid special page
Hi, using the trunk version of MW and this extension is not showing up as a valid special page. Promethean 04:40, 13 December 2008 (UTC)

Incompatible with 1.16 alpha
Due to MessageCache::addMessages not being there. – Nikerabbit 15:10, 29 June 2009 (UTC)

Nor 1.15.0
Seems to break on MW 1.15.0. --Bsmithme 01:55, 4 July 2009 (UTC)
 * same here with 1.15.4 --15:20, 6 July 2010 (UTC)

Warning for overwrite
Great extension. Works fine for me with 1.15.4. Only shortcoming is the lack of warning for files already existing (it generates another version) 138.246.7.74 18:16, 17 July 2010 (UTC)

Transfer to 1.16.0
This extension does not work with 1.16.

Firstly, with "require_once('specials/SpecialUpload.php');" fixed, the words in the form are replaced by " ". "$wgMessageCache->addMessages($messages);" no more works; instead, it can be easily converted to an i18n file. The form shows right, however, error occurs when submitting the files.

PHP Fatal error: Call to undefined method UploadForm::uploadform in ...\extensions\SpecialUploadLocal\UploadLocalForm.php on line 33

In 1.15, there is only a includes/specials/SpecialUpload.php (59KB) for uploading. These is a mere class, UploadForm, mentioned in SpecialUpload.php. includes/specials/SpecialUpload.php In 1.16, includes/specials/SpecialUpload.php is resized to 32KB and an includes/upload directory is established with 4 files. Classes are more complex. includes/specials/SpecialUpload.php includes/upload/UploadBase.php includes/upload/UploadFromFile It is nearly impossible to make an extension for both 1.15 and 1.16. We need a new extension especially for 1.16. --Zayoo 13:22, 3 September 2010 (UTC)
 * -class UploadForm
 * |-function UploadForm( &$request )
 * |-function processUpload
 * -class SpecialUpload extends SpecialPage
 * |-protected function loadRequest( $request )
 * -class UploadForm extends HTMLForm
 * -class UploadSourceField extends HTMLTextField
 * -abstract class UploadBase
 * -class UploadFromFile extends UploadBase
 * |-function initializeFromRequest( &$request )


 * It's too difficult to make it work in 1.16. I've given up trying and install another 1.14 just for uploading. --Zayoo 19:21, 3 September 2010 (UTC)
 * So you mean you will over write your 1.16 for 1.14? Or will you have two versions of mediawiki? Adamtheclown 08:03, 15 November 2010 (UTC)
 * I just run both 1.16 and 1.14 in different directories but sharing the same database. I install 1.14 with another database, then change it to 1.16's database so it's harmless. After uploading in 1.14 with SpecialUploadLocal, I merge all the files in /images/ to 1.16's.--Zayoo 13:18, 21 November 2010 (UTC)

Need a 1.16 version
By making the changes required for Mediawiki.1.13 to 1.15 I was able to get to the main page.

But when I press the upload local files button, I get the same error as Zayoo:


 * Fatal error: Call to undefined method UploadForm::UploadForm in /home/content/c/2/o...extensions/SpecialUploadLocal/UploadLocalForm.php on line 33

Line 33 of UploadLocalForm.php is:
 * parent::UploadForm($request);

I emailed and messaged the creator: User talk:Edward Z. Yang asking for a newer version.

Adamtheclown 07:59, 15 November 2010 (UTC)


 * Have you tried the using the importImages.php maintenance script instead? If you don't have shell access, you still should be able to run it with Extension:MaintenanceShell. —Emufarmers(T 15:58, 15 November 2010 (UTC)