Closed JJMeijer closed 3 years ago
Ignore last comment, replied from the wrong project entirely (I'm a little short on sleep lately...).
I'll take a look at this, I may have missed an updated flag on some API call somewhere to preserve the path for this backend on Windows.
Interesting, the Google Clould Files API docs say they handle both \
and /
as directory separators, however I'll push a small patch to replace \
with /
anyway in remote paths when uploading with the bundled Google storage backend anyway.
This is in the just pushed 2.7 version if django-distill
- please update and see if this fixes your issue. I don't actually have a Windows machine on hand (or a Google account!) to test this so I've just taken an educated guess to fix it.
Fixed! Thank you and take care!
No problem, cheers!
Hi, I'm using django-distill with the Google storage backend on windows. When uploading a file the remote path for the file becomes
path\\to\\index.html
. However Google storage interprets that literally and does not convert the windows path format. So the URL for the uploaded file becomeshttps://storage.googleapis.com/bucket/path%5Cto%5Cindex.html
instead of thehttps://storage.googleapis.com/bucket/path/to/index.html
that you would expect.Would it be possible to convert the windows-style path format to the right url format before initiating the upload?