Comments (6)
Would be nice to see the actual call you made to get this error ( just change the url to [URL]
).
In cloudsend.sh
, try changing the hashbang (first line) from
#!/usr/bin/env bash
To your alpine bash location (eg.)
#!/bin/bash
You can find it with
which bash
or
command -v bash
Then also try to run from Bash (instead of Busybox/Ash).
Just call bash
. Then run from it.
Since I don't have much info, I am just guessing some stuff.
I would guess this is more of an Alpine problem than NC21.
Or you just made an invalid call.
Cheers
Tav
from cloudsend.sh.
Just something I noticed, NC21 changed the webdav routes. They are not remote.php/webdav/... but remote.php/dav/files/[username]
from cloudsend.sh.
This is a bit confusing.
From the documentation, they seem to use
/dav/
for remote.php/webdav/
for public.php
The Apache / Nginx / Other proxy configuration can also cause problems. The proxy config could also solve the problem by redirecting/rewriting /dav/ to /webdav/ or vice-versa.
The NC21 documentation still lists the correct folder as
https://example.com/nextcloud/public.php/webdav
They may have changed the code and not updated the docs though. I don't have a NC21 to test at this point.
One issue is that if the wrong one is used, there is no error. No error from curl and no response error as well.
If I try to open the correct one without the token/password, I would get a XML with an error as response. The wrong one returns nothing. So, I guess I could try one, see if I get the error response and then try the other one if I get nothing. This would require an extra curl call, some parsing, etc.
Example response
$ curl 'https://cloud.mydomain.tld/public.php/webdav/'
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
<s:message>No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured</s:message>
</d:error>
Example blank
$ curl 'https://cloud.mydomain.tld/public.php/dav/'
But then I noticed that the one that does not work actually returns a '404 Not Found'
status and the one that works returns a '401 Unauthorized'
status code.
I still dislike the overhead of an extra curl call, but I can't see other way of automagically checking this. Only other option is to have a parameter that would change it or turn checking on.
I will probably try it without authentication and check for the 401 status code (the one that works). Then if it gets anything else, change webdav to dav and check again. If failed again, exit program.
I like the idea of at least having a way to make multiple calls not check every time.
@teriansilva I will let you know when I implement this so you can test in NC21.
Cheers!
from cloudsend.sh.
Example calls to get URL status
401
$ curl -s -o /dev/null -I -w "%{http_code}" 'https://cloud.mydomain.tld/public.php/webdav/'
401
404
$ curl -s -o /dev/null -I -w "%{http_code}" 'https://cloud.mydomain.tld/public.php/dav/'
404
from cloudsend.sh.
I will wait for some confirmation that the public.php URL actually changed from /webdav/
to /dav/
in NC21.
The remote.php URL has been changed to /dav/
for quite some time already, but that is another thing.
from cloudsend.sh.
I never got to try this in NC21. But I tested it in NC20 and NC22 and they both worked without problems. Since the original poster never bothered to reply with more info and this problem was never confirmed, I will close this.
from cloudsend.sh.
Related Issues (13)
- Send directories? HOT 11
- Option to specify the remote file name HOT 9
- Screenshots HOT 1
- Progress bar HOT 2
- Create folders HOT 6
- Better messages for globbing HOT 1
- Sending to existing subfolder HOT 3
- RPM package for ROSA HOT 2
- Transfer of files/directories with # in name does not work HOT 4
- return URL after uploading ? HOT 3
- Get curl --limit-rate settings accessible HOT 3
- Support chunked upload HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudsend.sh.