fix(download): les fichiers peuvent être accédés via /files

master
François Poulain 2 years ago
parent 3f20b966cd
commit 75eae59ee4
  1. 2
      drupal2spip_lal/base/convert.py

@ -71,6 +71,8 @@ def download(src, filename, force_download):
src = 'http://{}{}'.format(settings.DRUPAL_FQDN, src)
elif src and src.startswith('sites/default/files/'):
src = 'http://{}/{}'.format(settings.DRUPAL_FQDN, src)
elif src and src.startswith('files/'):
src = 'http://{}/{}'.format(settings.DRUPAL_FQDN, src)
elif not re.match(r'^(https?)?://', src):
raise ValueError('Impossible de localiser: {}'.format(src))

Loading…
Cancel
Save