jowilf / sqlalchemy-file

SQLAlchemy-file is a SQLAlchemy extension for attaching files to SQLAlchemy model and uploading them to various storage such as Local Storage, Amazon S3, Rackspace CloudFiles, Google Storage and others using Apache Libcloud.
https://jowilf.github.io/sqlalchemy-file/
MIT License
82 stars 11 forks source link

Cannot get file for storage name with complex path #147

Open LucianDeveloper opened 2 months ago

LucianDeveloper commented 2 months ago

File "/usr/local/lib/python3.10/site-packages/sqlalchemy_file/file.py", line 153, in file too many values to unpack (expected 2) <class 'ValueError'> too many values to unpack (expected 2) <traceback object at 0x7f34c0c05b40> return StorageManager.get_file(self["path"]) File "/usr/local/lib/python3.10/site-packages/sqlalchemy_file/storage.py", line 115, in get_file upload_storage, file_id = path.split("/")

If you are using a repository with folders like project-media/user_avatar, you will get an error when trying to retrieve the file