Extension talk:SpecialUploadLocal
From MediaWiki.org
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).
[edit] problem
test w/ 1.8.2, work! —The preceding unsigned comment was added by Mihu (talk • contribs) . Please sign your posts with ~~~~! 22:41, 14 December 2006
[edit] 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 —The preceding unsigned comment was added by 88.73.16.149 (talk • contribs) . Please sign your posts with ~~~~! 10:22, 20 December 2006
[edit] 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.. —The preceding unsigned comment was added by 198.129.106.24 (talk • contribs) . Please sign your posts with ~~~~! 01:36, 18 January 2007
[edit] 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)
Note that the above conversation may have been edited or added to since the transfer. If in doubt, check the edit history.
[edit] Question
before i install and try this out - does it allow you to specify the page content and license for the images? —The preceding unsigned comment was added by 68.244.152.222 (talk • contribs) . Please sign your posts with ~~~~! 12:51, 26 July 2007
[edit] 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.
—The preceding unsigned comment was added by 208.75.98.106 (talk • contribs) . Please sign your posts with ~~~~! 23:52, 28 July 2007
[edit] 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
—The preceding unsigned comment was added by SimeonArgus (talk • contribs) . Please sign your posts with ~~~~! 03:44, 8 October 2007
[edit] Hacky Fix for 1.11
Overwrite the UploadLocalForm class constructor with this:
function UploadLocalForm($filename, $description, $watch, $dest) { global $wgUploadLocalDirectory; $this->mDesiredDestName = $dest; $this->mIgnoreWarning = true; //ignore warnings... don't wanna deal with 'em //however, this attitude means that it's //extremely easy to accidently overwrite //files. Solution? $this->mComment = $description; $this->mReUpload = true; $this->mUploadClicked = true; $this->mLicense = ''; //not supported yet $this->mCopyrightStatus = ''; //not supported yet $this->mCopyrightSource = ''; //not supported yet $this->mWatchthis = $watch; $this->mSourceType = ''; $this->mDestWarningAck = 'true'; $this->mAction = 'submit'; $this->mSessionKey = true; //makes it think that it is locally stored $this->_filename = $filename; $directory = $wgUploadLocalDirectory; if ($directory[strlen($directory)-1] !== '/') $directory .= '/'; $this->mTempPath = $directory . $filename; $this->mFileSize = filesize($this->mTempPath); $this->mSrcName = $directory . $filename; $this->mFileProps = ''; $this->mCurlError = 0/*UPLOAD_ERR_OK*/; $this->mStashed = false; $this->mRemoveTempFile = false; }
—The preceding unsigned comment was added by 128.29.43.1 (talk • contribs) . Please sign your posts with ~~~~! 20:16, 6 November 2007
-
- These problems have been fixed in the latest release. Upgrade upgrade! — 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)
- I have the newest version and it does not work on 1.7.1 mediawiki, I get the error:
- These problems have been fixed in the latest release. Upgrade upgrade! — Edward Z. Yang(Talk) 23:47, 9 February 2008 (UTC)
[edit] 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? —The preceding unsigned comment was added by 82.238.59.92 (talk • contribs) . Please sign your posts with ~~~~! 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. — Edward Z. Yang(Talk) 23:38, 9 May 2008 (UTC)
[edit] 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 —The preceding unsigned comment was added by 195.124.178.100 (talk • contribs) . Please sign your posts with ~~~~!
- Those who can read have a clear advantage over others;-) => The fix mentioned above solves the problem 08:47, 15 January 2008 —The preceding unsigned comment was added by 195.124.178.100 (talk • contribs) . Please sign your posts with ~~~~!
[edit] 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 —The preceding unsigned comment was added by 81.68.131.163 (talk • contribs) . Please sign your posts with ~~~~! 10:18, 21 March 2008
- Hi, the best solution is to use MediaWiki 1.11, otherwise, use an older version of the extension. — Edward Z. Yang(Talk) 23:39, 9 May 2008 (UTC)
[edit] 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? —The preceding unsigned comment was added by 194.2.155.16 (talk • contribs) . Please sign your posts with ~~~~! 15:57, 1 May 2008
- Same problem here. —The preceding unsigned comment was added by 194.2.155.16 (talk • contribs) . Please sign your posts with ~~~~!
-
- 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)
[edit] 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 "$1."',
'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)
[edit] 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');
[edit] 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".
[edit] 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?
[edit] 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.
[edit] 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.
[edit] Fix for 1.13 and some modifications
To make it work in 1.13:
Replace in UploadLocalForm.php
require_once('SpecialUpload.php');
with
require_once('specials/SpecialUpload.php');
---
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
foreach($forms as $key => $value) {
following code:
$img = wfFindFile( $forms[$key]->mDesiredDestName ); if ($img) { $width = $img->getWidth(); if ($width >= 250) continue; }
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)
[edit] 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)
[edit] Incompatible with 1.16 alpha
Due to MessageCache::addMessages not being there. – Nikerabbit 15:10, 29 June 2009 (UTC)
[edit] Nor 1.15.0
Seems to break on MW 1.15.0. --Bsmithme 01:55, 4 July 2009 (UTC)