I have tested with */maintenance/importImages.php* to upload files to my wiki-installations. Seems like it works quite easily
So my basic idea was: * copy my new file to a SMB-share on my wiki-server * cron starts a script which runs the importImages.php script and deletes the importet files
Well reaching this point i notice a small *problem regarding override.* Per default importImages skips the upload/import of an image if there is already a file with the same name in my wiki. Thats ok and does makes sense.
Is there a way to realize if importImages does successfully import an image ? Cause i want to delete only the imported images from the SMB-share
If i start importImages from command-line i get something like this:
WsusDebugTool.zip exists, skipping Importing test_voda.pdf...done.
*So my final question is:* -- how should my cron-script looks like to execute maintenance/importImages.php for each file in my INCOMING-SMB-folder (i.e. /media/samba/import_me_to_wiki/) and delete the file ONLY if the file was uploaded/added to my wiki.
any ideas howto implement this ?
Best regards Florian
Florian Poeck (EDV) - Kniel System-Electronic GmbH wrote:
I have tested with */maintenance/importImages.php* to upload files to my wiki-installations. Seems like it works quite easily
So my basic idea was:
- copy my new file to a SMB-share on my wiki-server
- cron starts a script which runs the importImages.php script and
deletes the importet files
YOu can also use inotify http://inotify.aiken.cz/ to detect when a file gets to your share.
Well reaching this point i notice a small *problem regarding override.* Per default importImages skips the upload/import of an image if there is already a file with the same name in my wiki. Thats ok and does makes sense.
Note you could call it with --overwrite parameter.
Is there a way to realize if importImages does successfully import an image ? Cause i want to delete only the imported images from the SMB-share
(...) delete the file ONLY if the file was uploaded/added to my wiki.
any ideas howto implement this ?
Best regards Florian
What about changing imporImages.php to delete succesfully uploaded files? Just add a call unlink($file) at line 86, where it says: # We're done!
mediawiki-l@lists.wikimedia.org