Comments (5)
Hi kbzowski,
thanks for sharing the bug.
I have fixed the bug and added test 13-3 that covers the bug.
Please try out v1.8.1.
Regards
hobigo
from nextcloud-node-client.
Works fine with 1.8.1. Does not work with 1.8.2
from nextcloud-node-client.
Hi kbzowski,
I did not publish 1.8.2 to npm - 1.8.1 is the latest version
here is an example project.
rgds hobigo
src/index.ts
import Client, {
Server,
ICreateShare,
Folder,
Share,
} from "nextcloud-node-client";
(async () => {
const client: Client = new Client(
new Server({url:"https://myServer",basicAuth:{username:"myUser",password:"myPassword"}})
);
const folder: Folder = await client.createFolder("/my Public Share");
const createShare: ICreateShare = { fileSystemElement: folder, publicUpload: true };
let share: Share;
try {
share = await client.createShare(createShare);
console.log(`share created successfully for folder ${folder.name}`);
} catch (e) {
console.log("error occurred",e)
}
})();
package.json
{
"name": "ncnc-public-share",
"version": "1.0.0",
"description": "test project to create a public share with a nextcloud folder",
"main": "./dist/index.js",
"scripts": {
"build": "tsc",
"start": "node ./dist/index.js"
},
"author": "test",
"license": "ISC",
"devDependencies": {
"@types/node": "^14.0.27",
"@types/node-fetch": "^2.5.7",
"typescript": "^3.9.7"
},
"dependencies": {
"nextcloud-node-client": "^1.8.1"
}
}
tsconfig.json
{
"compilerOptions": {
"target": "es2018",
"module": "commonjs",
"rootDir": "./src",
"outDir": "./dist",
"strict": true,
"esModuleInterop": true
},
"include": [
"./**/*.ts"
],
"exclude": [
"node_modules"
]
}
npm i
npm run build
npm run start
from nextcloud-node-client.
I was almost sure that I saw 1.8.2 in my package.json. My mistake. It works fine with 1.8.1. Issue can be closed.
from nextcloud-node-client.
I had a commit with that version
If you like the nextcloud-node-client please leave me a star
rgds hobigo
from nextcloud-node-client.
Related Issues (20)
- Issue in deleting folder/file immediately after its creation. HOT 2
- feature
- Getting TypeError: Client is not a constructor HOT 2
- Please document how to set up & build the project
- Support for UserGroup shares
- new feature: searchFilesByTag HOT 8
- file search
- uploadFolderCommand endless loop if folder does not exits
- getSubfolders returns original folder if folder name contains blanks
- getFolder() always return null
- node-fetch types are not exported in fakeServer and http clienent
- Copy Folders with content HOT 3
- client.getQuota() does not return the correct quota
- Is it possible to upload a file on disk to nextcloud?
- Get share information HOT 1
- Javascript examples HOT 4
- Is there any plan to re-open this?
- Incorrect/missing URL encoding HOT 1
- getPercentCompleted returns only 0 and 100
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 nextcloud-node-client.