Error 500 upload file encrypted library

Hi,

i want to upload file on encrypted library. But i have an error 500.

If i use tha web panel to login on seafile account and enter on encrypted library, the upload works (code 200).

Why this?

Regards,

Upload by what? API? Or client?

with api

Did you decrypt library?
https://manual.seafile.com/develop/web_api_v2.1.html#decrypt-library

no,

the process is:

  • create cripto repository
  • get upload link
  • upload file.

is right?

I don’t know behavioral of API when you create encrypted library and immediately work with that. But I think one decryption more is nothing bad.

So you have to DECRYPT repository/library
and then get upload link or whatever you want. Don’t be confused. Seafile ENCRYPT only file content so metadata like filename, lastchange date etc. are accessable without DECRYPTion. So you can read this data but cannot make any changes before DECRYPT.

Ok,

i trying the decriptation library before uplaod file.

but the question is:

  • i upladed files on library (not encrypted), this files are encrypted on server? or there are on clear mode?
    i can access on uploaded file server?

Files in classic library/repo are not encrypted on server. But you cannot just access them over File System cause they are chunked into blocks more will say manual.

https://manual.seafile.com/develop/data_model.html

Hi,

ok. the decrypt library api function doesn’t work:
https://manual.seafile.com/develop/web_api_v2.1.html#decrypt-library

For me it’s work perfect (tested right now). What version of seafile server are you using? What is the response?

Hi,

i have the return with all data informations of repository but the encrypted repository remains encrypted.

You sending bad request or use bad URL. If you send decrypt request it returns HTTP 200 OK and only text “success”. In case some error it only send HTTP errors code like manual saying.

400 Incorrect password
409 Repo is not encrypt
500 Internal server error

i sending in POST

password

url service:
api2/repos/repo-id/

this api /api2/repos/{repo-id}/ doesn’t work

https://manual.seafile.com/develop/web_api_v2.1.html#decrypt-library

if the {repo-id} is the id of encrypted repository i haven’t reponse.

If is the id of not encrypted repo, i have the success message.

Is not right this!

I said that many times. Seafile WebAPI have in some cases bad behaviral like this.

But is it seafile’s problem that you trying decrypt not encrypted library? You can download library info where is info if is or not encrypted. So empty messages, invalid responses and other indicate that you have something wrong. I tested a lot of methods a never catch not working method.

the library is encryptyed.

i use the same http connection of other seafiles web api and works

but with Decrypt Library api doesn’t work. i have the error 400, bad request

from manual 400 Incorrect password

excuse me 440

RFC saying 440 Login Time-out. If you decrypt your library there is limited time when is library decrypted and after that time it’s encrypted again (I think it’s 1 hour).