motioneye-project / motioneye

A web frontend for the motion daemon.
GNU General Public License v3.0
3.94k stars 650 forks source link

A "slash" folder is added automatically when uploading to S3 #2912

Open serniko97 opened 8 months ago

serniko97 commented 8 months ago

Browsing the motionEye clips stored on S3 I noticed they are all inside a "folder" simply named /. After looking at some packet capture I can see motionEye is requesting this URL: mys3provider.com/bucketname//motionEye/2024-01-08/2024-01-08_13/2024-01-08_13-12-51.mp4?uploadId=3a48a31e-c030-46e3-b54c-e8aa6a07e703&partNumber=1, as you can see there are two slashes after the bucket's name causing this weird behavior.

The issue with this strange behavior is that clients such Rclone don't work properly with these key names and it returns this error:

$ rclone lsd remote:bucketname
2024/01/08 13:23:27 ERROR : : Entry doesn't belong in directory "" (same as directory) - ignoring

Looking at the pull requests I saw #2760 and I'm wondering if it could fix this issue.