Open ahmadalli opened 4 years ago
Given that the last_modifed
is provided through a custom x-depot-modified
metadata ( https://github.com/amol-/depot/blob/master/depot/io/boto3.py#L174 ) could it be that minio is not properly saving that attribute? At that point, is the x-depot-filename'
metadata correctly saved instead?
Both of them are used extensively by DEPOT when serving files (to serve them with correct filename and to handle caching correctly) so it's not feasible to just ignore those if they are not available.
this is part of the debug log:
[2020-06-03 09:57:09]: 568 DEBUG http://127.0.0.1:9000 "HEAD /<bucket>/b8f4930a-a55a-11ea-b61a-00155d5f7e2f HTTP/1.1" 200 0
[2020-06-03 09:57:09]: 568 DEBUG Response headers: {'Accept-Ranges': 'bytes', 'Content-Disposition': 'inline;filename="724e64a8-1fce-4a2f-8d9e-da3fc95421ef.model";filename*=utf-8\'\'724e64a8-1fce-4a2f-8d9e-da3fc95421ef.model', 'Content-Length': '3624043624', 'Content-Security-Policy': 'block-all-mixed-content', 'Content-Type': 'application/octet-stream', 'ETag': '"75019ca6aad98b76b8a99e30f486493b"', 'Last-Modified': 'Wed, 03 Jun 2020 05:27:09 GMT', 'Server': 'MinIO/RELEASE.2020-05-16T01-33-21Z', 'Vary': 'Origin', 'X-Amz-Meta-X-Depot-Filename': '724e64a8-1fce-4a2f-8d9e-da3fc95421ef.model', 'X-Amz-Meta-X-Depot-Modified': '2020-06-03 05:26:05', 'X-Amz-Request-Id': '1614F16F74FE66CC', 'X-Xss-Protection': '1; mode=block', 'Date': 'Wed, 03 Jun 2020 05:27:09 GMT'}
[2020-06-03 09:57:09]: 568 DEBUG Response body:
b''
there's a header named X-Amz-Meta-X-Depot-Modified
so I think the metadata has been set properly
Thanks, looks like the issue might be that it got prefixed with X-Amz-Meta-
.
Is the prefixing happening server side or you used any replacement of boto for the upload?
I wonder if the problem is that due to the prefixing DEPOT is unable to fetch back the metadata ( https://github.com/amol-/depot/blob/master/depot/io/boto3.py#L39 )
I'm trying store afile into sqlalchemy table. I'm using s3 boto interface with minio. The file gets uploaded but I get this exception:
this is the stacktrace from minio: