SOLVED - Seafile CE: Downloading files from an encrypted library fails

Hi,

I recently discovered a strange behaviour in a Seafile CE installation: When I try to download a file, the preview is triggered instead, i.e. a new tab opens and the (correct) message »Files in this library can not be viewed online.« is shown.

Download from encrypted libraries works as expected in Seafile Pro and I’m sure that the download worked before in Seafile CE, too. My seahub_settings.py dates from November 2016, did I miss any configuration directive introduced recently or any idea what could cause this error?

TIA

Thomas

I use Seafile CE 6.1.1 and I remember similar behavior, but only for files that are configured to be previewed somehow (text, img, documents). I think files that are not configured for any preview are downloaded directly.
Of curse it would be better to just get the download if the file is on an encrypted library.

Hi Garfield,

were you able to solve the problem?

I can not confirm that only previewable files are affected, I created a file with random content with the command

dd if=/dev/urandom of="Testupload -01 - 1 MByte.dat" bs=1M count=1

uploaded it and was unable to download it, too.

Best regards

Thomas

I tested again. Files in an encrypted library are not previewed, but I get a screen to be able to download the file. See pic:

Images are shown as overlay in the library, but I don’t get thumbnails of them (I think they are decrypted on the fly).

The contents of the library/folder can be shown as list. Each file in the list has a download link when it’s hovered which is working. Is this one workin for you?

Hi,

yes, Seafile shows the content of an encrypted library as usual:

My problem is not the limitation, that there is no preview, that’s fine. It’s that the download does not work, even when I choose it explicitly (notice the tool tip in the image above).

Instead of initiating the download Seafile triews to invoke the preview, which is not possible:

Best regards

Thomas

have you updated from a prior version or is it installed directly as 3.1.1?

Perhaps you could try a clean installation on another server and test with it?
I think you’re using some linux/unix?

Hi,

I’m not sure, but I think initially Seafile 2.1.x was installed and updated since then. :slight_smile:

I can not reproduce the behaviour on SeafilePro, neither our production cluster nor on our test server. Of course I could install a new instance of SeafileCE and will do so, if necessary. But the burden to find the cause will remain.

Best regards

Thomas

PS: I’m using Debian. :slight_smile:

The outdated option FORCE_SERVER_CRYPTO in seahub_settings.py caused the error. After removing the option dowloading files from encrypted libraries worked as expected. :slight_smile:

@daniel.pan: Thank you for investigating. :slight_smile: (May I suggest to remove the code that was triggered by FORCE_SERVER_CRYPTO? Outdated options should b ignored or Seafile should complain about their existence. :wink: )

Best regards

Thomas

1 Like