Uploads not working Chrome/Edge Windows 10

Issue #28 new
Former user created an issue

Uploads not working Chrome/Edge Windows 10 - also tried on Android/Chrome

Comments (11)

  1. Máté Gyöngyösi

    Reproduced on macOS Microsoft Edge 126.0.2592.81, Firefox 127.0.1, Chrome 126.0.6478.183 and iOS Safari 17.5.

  2. Magnus Manske repo owner

    Not sure what’s going on there, but I am certain that prefilled_requests in ToolforgeCommon.php has nothing to do with it.

    In your email you wrote that the actual error is {"status":"UNKNOWN ACTION ''","REQUEST":[]} which implies that the $action string was empty in the line you already found https://bitbucket.org/magnusmanske/wikishootme/src/11c2b49d575d166a6a95aa2a1f240caa021ec44f/public_html/api_v3.php?at=master#lines-327

    There is only one assignment of $action in the api code, so I assume it must be passed as empty from the JS interface. I’ll have a look. In the meantime, maybe double-check that you are logged into Wikidata in the browsers where it doesn’t work?

  3. Magnus Manske repo owner

    I have enabled logging of API calls to console.log, maybe that can help you debug?

  4. Máté Gyöngyösi

    I’ll have a look.

    @magnusmanske Thank you very much!

    double-check that you are logged into Wikidata in the browsers where it doesn’t work

    I’ve double-checked it in all browsers mentioned above. Here is a screenshot from macOS Safari:

    I have enabled logging of API calls to console.log, maybe that can help you debug?

    Unfortunately I still do not see any logs during uploading. The only one I see is for the user OAuth check when the page is loaded:

  5. Magnus Manske repo owner

    I put in a “Appending object for upload” console.log into the live site.

    I don’t really have any pictures to upload so missing a test case myself :-(

  6. Máté Gyöngyösi

    I put in a “Appending object for upload” console.log into the live site.

    Thank you! This is the log I get:

    data seems okay to me, it has the correct action value (see the watched expression):

    The POST request data sent to https://wikishootme.toolforge.org/api_v3.php is as follows:

    ------WebKitFormBoundarycODRiTEh70decnj2
    Content-Disposition: form-data; name="file"; filename="IMG_3639.jpeg"
    Content-Type: image/jpeg
    
    
    ------WebKitFormBoundarycODRiTEh70decnj2
    Content-Disposition: form-data; name="action"
    
    upload_background
    ------WebKitFormBoundarycODRiTEh70decnj2
    Content-Disposition: form-data; name="q"
    
    Q125824974
    ------WebKitFormBoundarycODRiTEh70decnj2
    Content-Disposition: form-data; name="wpDestFile"
    
    Zsiráf Tranzit.jpg
    ------WebKitFormBoundarycODRiTEh70decnj2
    Content-Disposition: form-data; name="wpUploadDescription"
    
    == {{int:filedesc}} ==
    {{Information
    |Description=[[d:Q125824974|Zsiráf Tranzit]]
    |Source={{own}}
    |Date=
    |Author=[[User:Gymate|]]
    |Permission=
    |other_versions=
    }}
    {{Object location|47.47411|19.03993}}
    <!--LOC-->
    
    == {{int:license-header}} ==
    {{self|cc-by-sa-3.0}}
    ------WebKitFormBoundarycODRiTEh70decnj2--
    

    It also includes upload_background in line 9.

    From here, the API does the work, then passes the extraction of the request parameters to ToolforgeCommon.php, which should do the work here: https://bitbucket.org/magnusmanske/magnustools/src/5b8cea412000072a2c8753023c11472a4ac11ef5/public_html/php/ToolforgeCommon.php?at=master#lines-68
    If this line could be debugged somehow, we might learn something about where the upload request goes wrong.

    I don’t really have any pictures to upload so missing a test case myself :-(

    Here is a picture of mine depicting https://www.wikidata.org/wiki/Q125824974: https://www.icloud.com/iclouddrive/07cYeCSQJgTd6H8msXr0yHjoQ#IMG_3639
    I hereby release it into the public domain. You can try uploading this here (and you can also take credit for the picture on Commons): https://wikishootme.toolforge.org/#lat=47.474474039751506&lng=19.040191769599918&zoom=18&layers=wikidata_no_image

    Or if you could help me set up a local API server, I could try debugging it myself.

  7. Log in to comment