-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix s3 cloud compatibility #2663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix s3 cloud compatibility #2663
Conversation
- this change needed whever the current os platform is different thn s3 cloud platform. In this case the os.path.pathnorm() will not work properly since it treats storage as it is placed in the current system. - without this change, browsing deep path in FileAdmin view such as /admin/fileadmins3/b/xx/yy/zz will response 404 code.
Thanks for the PR! Looks like you used python 3.10 or above so tests on 3.9 are failing because of the pipe operator |
From a quick google search,
|
as i said , the current os (Windows) with s3 cloud (Linux) in these cases we should initiate the posixpath.normpath() returns the path in Unix style even if the os is Windows which is not what we are looking for! what we need is letting s3FileAdmin view works based on s3 cloud's os while other local FileAdmin views works based on the local os which can be defined automatically by |
I didn't know you could have Windows on S3. Do you have any docs about it? My understanding was that S3 has only one path convention, so posixpath would solve the issue since it returns always the same result from both Windows and Linux |
i don't know either, i am just asumming worst case senario. however, this article shows that it is possible using what so called FSx which is something different from S3 as i believe. Anyway, on_windows parameter Must be added. even if S3 uses posixpath then we have to tell |
keep in mind that the changes of normpath() are made on |
this change needed whever the current os platform is different thn s3 cloud platform. In this case the os.path.pathnorm() will not work properly since it treats storage as it is placed in the current system.
Before this PR, browsing deep path in FileAdmin view such as /admin/fileadmins3/b/xx/yy/zz responses 404 code. This can happend only when the current os is "Windows" and the cloud s3 is "non-Windows" and vise versa.