Merge pull request #52182 from nextcloud/feat/dav/public-share-chunked-upload
commit
24c6a1ff0b
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OCA\DAV\Files\Sharing;
|
||||
|
||||
use Sabre\DAV\INode;
|
||||
use Sabre\DAVACL\AbstractPrincipalCollection;
|
||||
use Sabre\DAVACL\PrincipalBackend\BackendInterface;
|
||||
|
||||
class RootCollection extends AbstractPrincipalCollection {
|
||||
public function __construct(
|
||||
private INode $root,
|
||||
BackendInterface $principalBackend,
|
||||
string $principalPrefix = 'principals',
|
||||
) {
|
||||
parent::__construct($principalBackend, $principalPrefix);
|
||||
}
|
||||
|
||||
public function getChildForPrincipal(array $principalInfo): INode {
|
||||
return $this->root;
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return 'files';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,2 @@
|
||||
"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[1656],{4466:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(71354),i=a.n(n),r=a(76314),s=a.n(r)()(i());s.push([e.id,"\n.invalid-filename-dialog__input[data-v-3a479259] {\n\t/* Ensure the helper text can always be shown without jumping */\n\tmin-height: calc(var(--default-clickable-area) + 4 * var(--default-font-size));\n}\n","",{version:3,sources:["webpack://./node_modules/@nextcloud/upload/dist/assets/InvalidFilenameDialog-YDOzIzS6.css"],names:[],mappings:";AACA;CACC,+DAA+D;CAC/D,8EAA8E;AAC/E",sourcesContent:["\n.invalid-filename-dialog__input[data-v-3a479259] {\n\t/* Ensure the helper text can always be shown without jumping */\n\tmin-height: calc(var(--default-clickable-area) + 4 * var(--default-font-size));\n}\n"],sourceRoot:""}]);const l=s},11656:(e,t,a)=>{a.r(t),a.d(t,{default:()=>_});var n=a(85072),i=a.n(n),r=a(97825),s=a.n(r),l=a(77659),o=a.n(l),c=a(55056),d=a.n(c),m=a(10540),u=a.n(m),h=a(41113),p=a.n(h),f=a(4466),v={};v.styleTagTransform=p(),v.setAttributes=d(),v.insert=o().bind(null,"head"),v.domAPI=s(),v.insertStyleElement=u(),i()(f.A,v),f.A&&f.A.locals&&f.A.locals;var g=a(35810),w=a(85471),A=a(85748),E=a(94219),b=a(82182),N=a(40083);const y=(0,w.pM)({components:{NcDialog:E.A,NcNoteCard:N.A,NcTextField:b.A},props:{error:{type:g.di,required:!0},validateFilename:{type:Function,required:!0}},setup:()=>({t:A.t}),data:()=>({newName:"",validationError:""}),computed:{isValidName(){return""===this.validationError},isInvalidFileType(){return this.error.reason===g.nF.Extension&&null!==this.error.segment.match(/^\.\w/)},canRename(){return!this.isInvalidFileType},dialogButtons(){const e=[{label:(0,A.t)("Cancel"),type:"error",callback:()=>{this.$emit("close",{cancel:!0})}},{label:(0,A.t)("Skip"),callback:()=>{this.$emit("close",{skip:!0})}}];return this.canRename&&e.push({label:(0,A.t)("Rename"),type:"primary",disabled:!this.isValidName,callback:()=>{this.$emit("close",{rename:this.newName.trimEnd()})}}),e}},watch:{error:{handler(){this.validationError=this.getErrorText(this.error),this.newName=this.error.filename},immediate:!0},newName(){try{this.validateFilename(this.newName.trimEnd()),this.validationError=""}catch(e){this.validationError=this.getErrorText(e)}finally{const e=this.$refs.textfield?.$el.querySelector("input");e&&(e.setCustomValidity(this.validationError),e.reportValidity())}}},methods:{getErrorText(e){switch(e.reason){case g.nF.Character:return(0,A.t)('"{segment}" is not allowed inside a file or folder name.',{segment:e.segment});case g.nF.ReservedName:return(0,A.t)('"{segment}" is a forbidden file or folder name.',{segment:e.segment});case g.nF.Extension:return e.segment.match(/\.\w/)?(0,A.t)('"{segment}" is a forbidden file type.',{segment:e.segment}):(0,A.t)('Filenames must not end with "{segment}".',{segment:e.segment})}}}});var x=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("NcDialog",{attrs:{buttons:e.dialogButtons,name:e.t("Invalid filename")},on:{close:function(t){return e.$emit("close",{cancel:!0})}}},[t("NcNoteCard",{attrs:{severity:"error"}},[e._v(" "+e._s(e.getErrorText(e.error))+" "+e._s(e.t("You can either rename the file, skip this file or cancel the whole operation."))+" ")]),e.canRename?t("NcTextField",{ref:"textfield",staticClass:"invalid-filename-dialog__input",attrs:{error:!e.isValidName,"helper-text":e.validationError,label:e.t("New filename"),value:e.newName},on:{"update:value":function(t){e.newName=t}}}):e._e()],1)},C=[];const _=(0,A.n)(y,x,C,!1,null,"3a479259").exports}}]);
|
||||
//# sourceMappingURL=1656-1656.js.map?v=05d90ab05fafdbaeed35
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
1656-1656.js.license
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
3485-3485.js.license
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,2 +0,0 @@
|
||||
"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[6445],{4466:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(71354),i=a.n(n),r=a(76314),s=a.n(r)()(i());s.push([e.id,"\n.invalid-filename-dialog__input[data-v-3a479259] {\n\t/* Ensure the helper text can always be shown without jumping */\n\tmin-height: calc(var(--default-clickable-area) + 4 * var(--default-font-size));\n}\n","",{version:3,sources:["webpack://./node_modules/@nextcloud/upload/dist/assets/InvalidFilenameDialog-YDOzIzS6.css"],names:[],mappings:";AACA;CACC,+DAA+D;CAC/D,8EAA8E;AAC/E",sourcesContent:["\n.invalid-filename-dialog__input[data-v-3a479259] {\n\t/* Ensure the helper text can always be shown without jumping */\n\tmin-height: calc(var(--default-clickable-area) + 4 * var(--default-font-size));\n}\n"],sourceRoot:""}]);const l=s},46445:(e,t,a)=>{a.r(t),a.d(t,{default:()=>_});var n=a(85072),i=a.n(n),r=a(97825),s=a.n(r),l=a(77659),o=a.n(l),c=a(55056),d=a.n(c),m=a(10540),u=a.n(m),h=a(41113),p=a.n(h),f=a(4466),v={};v.styleTagTransform=p(),v.setAttributes=d(),v.insert=o().bind(null,"head"),v.domAPI=s(),v.insertStyleElement=u(),i()(f.A,v),f.A&&f.A.locals&&f.A.locals;var g=a(35810),w=a(85471),A=a(4011),E=a(94219),b=a(82182),N=a(40083);const y=(0,w.pM)({components:{NcDialog:E.A,NcNoteCard:N.A,NcTextField:b.A},props:{error:{type:g.di,required:!0},validateFilename:{type:Function,required:!0}},setup:()=>({t:A.t}),data:()=>({newName:"",validationError:""}),computed:{isValidName(){return""===this.validationError},isInvalidFileType(){return this.error.reason===g.nF.Extension&&null!==this.error.segment.match(/^\.\w/)},canRename(){return!this.isInvalidFileType},dialogButtons(){const e=[{label:(0,A.t)("Cancel"),type:"error",callback:()=>{this.$emit("close",{cancel:!0})}},{label:(0,A.t)("Skip"),callback:()=>{this.$emit("close",{skip:!0})}}];return this.canRename&&e.push({label:(0,A.t)("Rename"),type:"primary",disabled:!this.isValidName,callback:()=>{this.$emit("close",{rename:this.newName.trimEnd()})}}),e}},watch:{error:{handler(){this.validationError=this.getErrorText(this.error),this.newName=this.error.filename},immediate:!0},newName(){try{this.validateFilename(this.newName.trimEnd()),this.validationError=""}catch(e){this.validationError=this.getErrorText(e)}finally{const e=this.$refs.textfield?.$el.querySelector("input");e&&(e.setCustomValidity(this.validationError),e.reportValidity())}}},methods:{getErrorText(e){switch(e.reason){case g.nF.Character:return(0,A.t)('"{segment}" is not allowed inside a file or folder name.',{segment:e.segment});case g.nF.ReservedName:return(0,A.t)('"{segment}" is a forbidden file or folder name.',{segment:e.segment});case g.nF.Extension:return e.segment.match(/\.\w/)?(0,A.t)('"{segment}" is a forbidden file type.',{segment:e.segment}):(0,A.t)('Filenames must not end with "{segment}".',{segment:e.segment})}}}});var x=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("NcDialog",{attrs:{buttons:e.dialogButtons,name:e.t("Invalid filename")},on:{close:function(t){return e.$emit("close",{cancel:!0})}}},[t("NcNoteCard",{attrs:{severity:"error"}},[e._v(" "+e._s(e.getErrorText(e.error))+" "+e._s(e.t("You can either rename the file, skip this file or cancel the whole operation."))+" ")]),e.canRename?t("NcTextField",{ref:"textfield",staticClass:"invalid-filename-dialog__input",attrs:{error:!e.isValidName,"helper-text":e.validationError,label:e.t("New filename"),value:e.newName},on:{"update:value":function(t){e.newName=t}}}):e._e()],1)},C=[];const _=(0,A.n)(y,x,C,!1,null,"3a479259").exports}}]);
|
||||
//# sourceMappingURL=6445-6445.js.map?v=9acae0b42cd0cd19da0e
|
||||
@ -1 +0,0 @@
|
||||
6445-6445.js.license
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
7527-7527.js.license
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue