Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload function broken #119

Open
Steinsplitter opened this issue Feb 10, 2019 · 1 comment
Open

Upload function broken #119

Steinsplitter opened this issue Feb 10, 2019 · 1 comment

Comments

@Steinsplitter
Copy link

Upload function no longer works:

API Error...

Code: badupload_file
Text: File upload parameter "file" is not a file upload; be sure to use "multipart/form-data" for your POST and include a filename in the "Content-Disposition" header.

Upload error...

This is happening on labs (stretch), on the old trusty system it works. Cannot reproduce.

@Steinsplitter
Copy link
Author

Steinsplitter commented Feb 10, 2019

Works on trusty with php 5 but not on stretch with php7.

tools.sbot@tools-sgebastion-06:[~/Peachy/test]:` cat index.php

set_runpage( null ); $title = "File:Test.svg"; $title2 = str_replace(" ", "_", $title); $titlelocal = "Test.svg"; echo "\n\nTITLE UPLOAD:" . $title2 . "\n\nTITLELOCAL:" . $titlelocal . "\n\n"; $site->initImage( $title2 )->api_upload($titlelocal,'', "testupload", $watch = null, $ignorewarnings = true, $async = false ); $site->initPage( $title2 )->purge(); ?>

tools.sbot@tools-sgebastion-06:[~/Peachy/test]: php index.php
Checking for updates...

Peachy is up to date.

Loading Peachy (version 2.0 (alpha 8))...

Logging in to https://commons.wikimedia.org/w/api.php as SteinsplitterBot, using a saved login cookie

TITLE UPLOAD:File:Test.svg

TITLELOCAL:Test.svg

Getting image info for File:Test.svg...

Getting page info for File:Test.svg..

API Error...

Code: badupload_file
Text: File upload parameter "file" is not a file upload; be sure to use "multipart/form-data" for your POST and include a filename in the "Content-Disposition" header.

Upload error...

Getting page info for File:Test.svg..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant