Menu

#185 v5.0.0-pre1, op.ViewOnline.php, invalid filename and error handling

5.0.0
closed
nobody
None
bug
2015-03-09
2014-11-22
No

I would like to comment on an error when using the link to dowload a document (click on the document icon).

(1) The downloaded filename is incorrect. It is stored in the local filesystem as: “op.ViewOnline.php”. This is a big problem for users which are not computer scientists. Need to rename the file.

(2) While migrating from v4.3 I forgot to move the data directory. So the PDF file I was looking for was not on the filesystem. This error triggers an invalid error page handling. A file with name “op.ViewOnline.php” is downloaded and the content is a partial HTML page with some error details. I believe this is not the proper way to handle errors. A common error page should be used in order to handle and present all the details. I see the error page does not have a html head or body tags.

If you need more details send me an email to my user account at SourceForge. I will reply with a written report document 1.3Mbytes with screenshots and actions taken to analyze these issues.

Discussion

  • Jordi Ferran Sanchez

    I would like to add that this issue is related to a file being deleted on disk but referenced in document metadata in database.

    I believe a good workaround is to disable the link for using the viewOnline feature. See that at the right section in screen the links download and view online dynamically disappear when the file is not present in the filesystem. This is also controlled in the screen details as the text "Document deleted" is shown.

    A simple IF might suffice to disable the "view online" link on the document icon image.

     
  • Uwe Steinmann

    Uwe Steinmann - 2014-11-24

    I cannot reproduce your first issue. The download file name is the original filename saved when uploading the file. The second issue will be fixed in 4.3.13 as it affects not only 5.0.0.

     
  • Uwe Steinmann

    Uwe Steinmann - 2014-11-24
    • status: open --> pending
     
  • Jordi Ferran Sanchez

    I reproduce the first issue even with files existing on disk.

    I renamed a JPG image file to end with suffix ".pdf". Add this as a document. Use the view online, a popup offers me to download op.ViewOnline.php file.

    Try also to upload a JPG image as a document. View it online: works OK. Then use browser action save-as: the dialog shows the resource name as op.ViewOnline.php.

     
  • Uwe Steinmann

    Uwe Steinmann - 2014-11-25

    This must be browser dependent. It all works fine for me on Linux using Chrome and Firefox.

    Uploading a jpg with the extension .pdf will make the browser think it is a pdf file and setting the mimetype to application/pdf. SeedDMS will take over that mimetype from the browser. Nevertheless the preview still works because it doesn't rely on the mimetype. It looks into the file and creates a preview image. When downloading such a file it will sent by seeddms as application/pdf.

    The prefilled filename in a 'save as' dialog box is always taken from the original file, when the file was uploaded. I really can't see why it should take the name of the php file. The http header explitly sets the file name.

     
  • Uwe Steinmann

    Uwe Steinmann - 2015-03-09
    • status: pending --> closed
     

Log in to post a comment.

Auth0 Logo