Mercurial > libervia-backend
comparison sat/core/constants.py @ 3187:d92a144f3589
plugin download: use cache if dest_path is empty:
if dest_path is not set, the file will be downloaded in cache. A new name will be
generated using a hash of the uri. If the file is already downloded in cache, it won't be
downloaded again (in this case returned progress_id is an empty string).
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 26 Feb 2020 22:03:11 +0100 |
parents | 343b8076e967 |
children | a15773c6c273 |
comparison
equal
deleted
inserted
replaced
3186:84b0c8b4dee0 | 3187:d92a144f3589 |
---|---|
344 PROGRESS_ERROR_FAILED = "failed" # something went wrong with the session | 344 PROGRESS_ERROR_FAILED = "failed" # something went wrong with the session |
345 | 345 |
346 ## Files ## | 346 ## Files ## |
347 FILE_TYPE_DIRECTORY = "directory" | 347 FILE_TYPE_DIRECTORY = "directory" |
348 FILE_TYPE_FILE = "file" | 348 FILE_TYPE_FILE = "file" |
349 # when filename can't be found automatically, this one will be used | |
350 FILE_DEFAULT_NAME = "unnamed" | |
349 | 351 |
350 ## Permissions management ## | 352 ## Permissions management ## |
351 ACCESS_PERM_READ = "read" | 353 ACCESS_PERM_READ = "read" |
352 ACCESS_PERM_WRITE = "write" | 354 ACCESS_PERM_WRITE = "write" |
353 ACCESS_PERMS = {ACCESS_PERM_READ, ACCESS_PERM_WRITE} | 355 ACCESS_PERMS = {ACCESS_PERM_READ, ACCESS_PERM_WRITE} |
376 CONTEXT_CHAT = "CONTEXT_CHAT" | 378 CONTEXT_CHAT = "CONTEXT_CHAT" |
377 | 379 |
378 ## Misc ## | 380 ## Misc ## |
379 SAVEFILE_DATABASE = APP_NAME_FILE + ".db" | 381 SAVEFILE_DATABASE = APP_NAME_FILE + ".db" |
380 IQ_SET = '/iq[@type="set"]' | 382 IQ_SET = '/iq[@type="set"]' |
381 ENV_PREFIX = "SAT_" # Prefix used for environment variables | 383 # Prefix used for environment variables |
384 ENV_PREFIX = "SAT_" | |
382 IGNORE = "ignore" | 385 IGNORE = "ignore" |
383 NO_LIMIT = -1 # used in bridge when a integer value is expected | 386 # used in bridge when a integer value is expected |
384 DEFAULT_MAX_AGE = 1209600 # default max age of cached files, in seconds | 387 NO_LIMIT = -1 |
388 # default max age of cached files, in seconds | |
389 DEFAULT_MAX_AGE = 3600 * 24 * 14 | |
385 HASH_SHA1_EMPTY = "da39a3ee5e6b4b0d3255bfef95601890afd80709" | 390 HASH_SHA1_EMPTY = "da39a3ee5e6b4b0d3255bfef95601890afd80709" |
386 STANZA_NAMES = ("iq", "message", "presence") | 391 STANZA_NAMES = ("iq", "message", "presence") |
387 | 392 |
388 # Stream Hooks | 393 # Stream Hooks |
389 STREAM_HOOK_SEND = "send" | 394 STREAM_HOOK_SEND = "send" |