• Resolved calvinstein

    (@calvinstein)


    WP Document Revisions Plugin allows upload of all file types excepting PDF.

    PDF files with certain names do upload but mostly I get the following error:
    Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.

    The document is created but with an incorrect permalink of
    https://www.nswjbd.org/wordpress/?post_type=document&p=8813&preview=true

    Changing the filename of the uploaded file to TEST.pdf works

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor nwjames

    (@nwjames)

    @calvinstein,
    This message comes from the Media file uploader – using the plupload modules.

    Since the plugin uses the Media uploader with basically two changes:
    a) On the server to mangle the file name once loaded;
    b) On the client to set the ttachment id into the document post.

    It would be useful to try loading the the one or two of the files that failed to load as documents but using the Media library directly to see whether it is the pure plupload.
    [Clearly this is only for probem isolation. You should delete the Media object even if it loads successfully.]

    Could you let me know
    a) What happens when using only the Media loader
    b) Some examples of the file names that did not use.

    If you ar able to, to use the debug capability of your web browser to see the detail of the error response received.

    Regards,
    Neil James

    Thread Starter calvinstein

    (@calvinstein)

    Hi Neil

    Many thanks for your response
    I have done some tests and captured network and directory images.
    Its all in an excel file which I can send to you if you email me at [email protected]

    These are the files tested

    Filename Uploaded	Content of file	File Size	Success	In Media Directory	URL
    Calvin Test PDF	Same as Com Mem	531KB	yes	yes	https://www.nswjbd.org/calvin-test-pdf-2/
    Com Mem	Same as Calvin Test PDF	533KB	no	yes	https://www.nswjbd.org/com-mem/
    Calvin JWM Test PDF	Same as JWM Nomination Form	434KB	no	yes	https://www.nswjbd.org/calvin-jwm-test-pdf/
    JWM Nomination Form	Same as Calvin JWM Test PDF	434KB	no	yes	https://www.nswjbd.org/jwm-nomination-form/
    Calvin Test PDF 2	Same as Calvin JWM Test PDF	433KB	yes	yes	https://www.nswjbd.org/calvin-test-pdf-2-2/
    	Calvin Test PDF 2 made by opening JWM Nomination Form with Adobe Acrobat reader and saving as Calvin Test PDF 2

    All files end up in the media directory with thumbnails and can be viewed

    The network messages for a successful upload are

    Name	Stat	Type	Initiator	Size	Time
    async-upload.php	200	xhr	movie.m…	502 B	3.4
    async-upload.php	201	xhr	jquery.m..	696 B	1.9
    Calvin-Test-PDF…	200	jpeg	jquery.m..	5.2	6 ms
    admin-ajax.php	300	xhr	jquery.m..	667 B	1.9

    The network messages for a failed upload are
    Name Stat Type Initiator Size Time
    async-upload.php 404 xhr movie.m… 23 5.8

    Thread Starter calvinstein

    (@calvinstein)

    Hi Neil

    I have found that there is an incompatibility with WORD saved PDF documents. After you have the PDF, open it with Adobe Viewer, and save a copy. The copy works ok.

    Thread Starter calvinstein

    (@calvinstein)

    Hi Neil

    Many thanks for your advice and debugging this issue to be a local issue. W now have it in control with a workaround.

    Thread Starter calvinstein

    (@calvinstein)

    The workaround of opening the WORD produced PDF files with Acrobat reader and saving them from Acrobat, works well.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Unexpected response from the server. The file may have been uploaded successfull’ is closed to new replies.