Gosh, can you believe that I have only read this today — a year after you posted this??
I suppose that this comes from FromContentMD5()
, right?
// FromContentMD5 decodes and returns the Content-MD5
// as ETag, if set. If no Content-MD5 header is set
// it returns an empty ETag and no error.
func FromContentMD5(h http.Header) (ETag, error) {
v, ok := h["Content-Md5"]
if !ok {
return nil, nil
}
if v[0] == "" {
return nil, errors.New("etag: content-md5 is set but contains no value")
}
b, err := base64.StdEncoding.Strict().DecodeString(v[0])
if err != nil {
return nil, err
}
if len(b) != md5.Size {
return nil, errors.New("etag: invalid content-md5")
}
return ETag(b), nil
}
I guess it’s still wrong (according to your code, I mean).
The bad news?
I’ve actually copied that from the uptream package, i.e. from MinIO itself — not from Cells.
I suppose that @bsinou will frown upon changing a local dependency — only to get it overwritten by any subsequent upgrade from MinIO (which is in constant development). In other words: sure, this can be easily fixed in Cells — but the issues come from MinIO.
I wonder if you could try to add a PR to MinIO’s own repo on GitHub. With luck, they’ll accept it, and with the next release, it would neatly fix Cells… once and forever! Yay!
I did not try to compile it myself, though. Not yet! But I’m very curious if it’s just something that simple. Well — simple, because you have spent so much time in debugging it, of course.
Because it’s not only Rclone that cannot connect via S3. A lot of things don’t. To name a few that I use every day (the list is not exhaustive): Rclone (obviously!), Transmit (macOS file transfer client), Cyberduck (platform-independent file transfer client), the remote sync mechanism of the Synology NAS… and then a few more esoteric things as well. And that’s just the beginning!..
Not to mention the ability to mount, via FUSE, an external S3 filesystem
Ah, there are so many things that I wish to do via S3…
I suddenly realise that the only reason that I still keep “our” Cells installation active is because I have been waiting for the past few years for a solution like yours. Because nobody wants to use something using a Web page any longer. Even our self-proclaimed “power users” are wary of using “Web pages” when it’s so easy and convenient to mount a remote filesystem these days — Dropbox, Google Drive, OneDrive, pCloud, etc. etc. and even things such as ownDrive. Alas, these tools only do file storage, of course, they don’t have the richness and flexibility of Pydio Cells — and many don’t support S3, obviously, but they are “established” services for which everybody writes drivers… while Pydio’s own protocol is naturally not supported. S3 is sort of a good compromise between richness of features and portability across different providers, although possibly with a certain lack of performance (I’ve never benchmarked it). It certainly beats WebDAV easily! 