-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Onedrive 分享链接存储方式无法上传文件 #8142
Comments
See |
Make sure you have already created a folder on the shared drive and that you're using that exact URL directory. In that folder is where you can upload the files. If you don't do it correctly, you won't be able to upload files or create folders. |
That's because you're using the wrong driver. The OneDrive shared link is just to access the files on that drive; it can't upload files to it. If you don't have permission to create your own ID and secrets to gain access to your account with Alist, then you must select the WebDAV driver on Alist. Next, you need to change the type of connection to SharePoint. While you're at it, go to your OneDrive account, navigate to SharePoint, create a new SharePoint site, and then copy that SharePoint URL from your browser. Go back to Alist, paste that URL, enter your account username and password, and you will be able to upload your files now. Keep in mind that your files will be in the SharePoint folder, not in your main OneDrive folder. |
Thanks, I roughly understand how to operate now, previously I used Onedrive share links for storage(https://xxxx-my.sharepoint.com/:f:/g/personal/hmgkw_umsystem_edu/Er2rJ5VtisRxxxxxxx), I switched to Webdav method. However, I can't log into the SharePoint admin center, so I can't create a site because I don't have the relevant permissions. I think this account might only be used officially. |
Then, you will need to switch to the main directory as a last resort because you don't have any access to the administration at all. If your shared URL it is kind of like this: You will need to change it to: https://xxxx-my.sharepoint.com/personal/hmgkw_umsystem_edu/Documents hmgkw_umsystem_edu <~ should be your email account if that's correct (if it's not, then change it, and replace the @ and . with _ as in the URL example I showed you). You should be able to access the drive. Just remember to maintain the vendor to SharePoint and put the email and password in the WebDAV driver on Alist. |
Thank you, I changed to an educational email with administrator privileges and successfully followed this method. However, the previous email without administrator privileges still reports an error when I try your method, and I think it might be lacking some permissions. |
Glad to hear you got it working with another account, at least. Anyways, it's a bit strange that it didn't work for the other account. It simply doesn't let you log into the account and give you access to the files, or you can't mount the account? This way should be able to work with any account that let you write and upload files on the website. Maybe Onedrive got more restricted. If you can give more details about the error or logs, that could help a bit. Cheers! |
My steps were very simple. First, I logged into OneDrive, then I created an empty folder and set it to be shared, finally I tried uploading and downloading files via the share link. All of the above steps were successful. Next, I attempted to mount the share link to alist via WebDav. I was completely unable to log into the account and gain access to the files using this method. Here are some screenshots of the steps I took during the operation, as well as the request information for configuring alist. Feel free to ask me questions at any time to clarify requirements or gather more information {
"id": 3,
"mount_path": "/Onedrive",
"order": 0,
"driver": "WebDav",
"cache_expiration": 30,
"status": "work",
"addition": "{\"vendor\":\"sharepoint\",\"address\":\"https://mailmissouri-my.sharepoint.com/personal/hmgkw_umsystem_edu/Documents\",\"username\":\"[email protected]\",\"password\":\"xxxooooooxxxx\",\"root_folder_path\":\"/\",\"tls_insecure_skip_verify\":false}",
"remark": "",
"modified": "2025-03-28T21:29:49.849669117+07:00",
"disabled": false,
"disable_index": false,
"enable_sign": false,
"order_by": "",
"order_direction": "",
"extract_folder": "",
"web_proxy": false,
"webdav_policy": "native_proxy",
"proxy_range": false,
"down_proxy_url": ""
} {
"code": 500,
"message": "failed get objs: failed to list objs: Authorize https://mailmissouri-my.sharepoint.com/personal/hmgkw_umsystem_edu/Documents/: 401",
"data": null
} |
Please make sure of the following things
I have read the documentation.
我已经阅读了文档。
I'm sure there are no duplicate issues or discussions.
我确定没有重复的issue或讨论。
I'm sure it's due to
AList
and not something else(such as Network ,Dependencies
orOperational
).我确定是
AList
的问题,而不是其他原因(例如网络,依赖
或操作
)。I'm sure this issue is not fixed in the latest version.
我确定这个问题在最新版本中没有被修复。
AList Version / AList 版本
v3.42.0
Driver used / 使用的存储驱动
Onedrive 分享链接
Describe the bug / 问题描述
在Onedrive端设置了共享文件夹,权限设置Anyone with the link and password can edit
采用一键脚本方式在Debian 12 1H 1G vps部署,在Alist端能够查看文件内容,但是无法上传文件(upload not supported,偶尔几次会报502)。也无法删除(Not implement)。其他存储方式,如AWS、Github可上传下载查看。直接使用Onedrive的共享链接也可以上传下载(删除受限不管)。
Reproduction / 复现链接
Config / 配置
{
"force": false,
"site_url": "https://cloud.cccccc.cc",
"cdn": "",
"jwt_secret": "QeHgDgd31yrCWokk",
"token_expires_in": 48,
"database": {
"type": "sqlite3",
"host": "",
"port": 0,
"user": "",
"password": "",
"name": "",
"db_file": "data/data.db",
"table_prefix": "x_",
"ssl_mode": "",
"dsn": ""
},
"meilisearch": {
"host": "http://localhost:7700",
"api_key": "",
"index_prefix": ""
},
"scheme": {
"address": "0.0.0.0",
"http_port": 5244,
"https_port": -1,
"force_https": false,
"cert_file": "",
"key_file": "",
"unix_file": "",
"unix_file_perm": ""
},
"temp_dir": "data/temp",
"bleve_dir": "data/bleve",
"dist_dir": "",
"log": {
"enable": true,
"name": "data/log/log.log",
"max_size": 50,
"max_backups": 30,
"max_age": 28,
"compress": false
},
"delayed_start": 0,
"max_connections": 0,
"max_concurrency": 64,
"tls_insecure_skip_verify": true,
"tasks": {
"download": {
"workers": 5,
"max_retry": 1,
"task_persistant": false
},
"transfer": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"upload": {
"workers": 5,
"max_retry": 0,
"task_persistant": false
},
"copy": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"decompress": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"decompress_upload": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"allow_retry_canceled": false
},
"cors": {
"allow_origins": [
""
],
"allow_methods": [
""
],
"allow_headers": [
"*"
]
},
"s3": {
"enable": false,
"port": 5246,
"ssl": false
},
"ftp": {
"enable": false,
"listen": ":5221",
"find_pasv_port_attempts": 50,
"active_transfer_port_non_20": false,
"idle_timeout": 900,
"connection_timeout": 30,
"disable_active_mode": false,
"default_transfer_binary": false,
"enable_active_conn_ip_check": true,
"enable_pasv_conn_ip_check": true
},
"sftp": {
"enable": false,
"listen": ":5222"
},
"last_launched_version": "v3.42.0"
}
Logs / 日志
ERRO[2025-03-16 13:02:25] failed put /Onedrive-1000G/: upload not supported
github.com/alist-org/alist/v3/internal/fs.putDirectly
/home/runner/work/alist/alist/internal/fs/put.go:78
github.com/alist-org/alist/v3/internal/fs.PutDirectly
/home/runner/work/alist/alist/internal/fs/fs.go:98
github.com/alist-org/alist/v3/server/handles.FsStream
/home/runner/work/alist/alist/server/handles/fsup.go:84
github.com/gin-gonic/gin.(*Context).Next
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185
github.com/alist-org/alist/v3/server/middlewares.FsUp
/home/runner/work/alist/alist/server/middlewares/fsup.go:43
github.com/gin-gonic/gin.(*Context).Next
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185
github.com/alist-org/alist/v3/server/middlewares.Auth
/home/runner/work/alist/alist/server/middlewares/auth.go:73
github.com/gin-gonic/gin.(*Context).Next
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185
github.com/alist-org/alist/v3/server/middlewares.StoragesLoaded
/home/runner/work/alist/alist/server/middlewares/check.go:14
github.com/gin-gonic/gin.(*Context).Next
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:102
github.com/gin-gonic/gin.(*Context).Next
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185
github.com/gin-gonic/gin.LoggerWithConfig.func1
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:249
github.com/gin-gonic/gin.(*Context).Next
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:633
github.com/gin-gonic/gin.(*Engine).ServeHTTP
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:589
net/http.serverHandler.ServeHTTP
/home/runner/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:3210
net/http.(*conn).serve
/home/runner/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:2092
runtime.goexit
/home/runner/go/pkg/mod/golang.org/[email protected]/src/runtime/asm_amd64.s:1700
[GIN] 2025/03/16 - 13:02:25 | 200 | 2.541945ms | 54.169.237.212 | PUT "/api/fs/put"
[GIN] 2025/03/16 - 13:02:26 | 200 | 929.350405ms | 54.169.237.212 | POST "/api/fs/list"
The text was updated successfully, but these errors were encountered: