Skip to content
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

create files #40

Closed
B-Carcamo opened this issue Mar 24, 2019 · 3 comments
Closed

create files #40

B-Carcamo opened this issue Mar 24, 2019 · 3 comments

Comments

@B-Carcamo
Copy link

B-Carcamo commented Mar 24, 2019

How do I create a file in a directory in asp.net core

@skazantsev
Copy link
Owner

Hi @braya2015 ,
Could you explain the context of your problem, please?
Are you trying to use WebDavClient in an Asp.Net Core application to make a call to a WebDAV server or is it some other use-case?
Could you also share what you have tried so far?

@B-Carcamo
Copy link
Author

B-Carcamo commented Mar 24, 2019

My web application in asp.net core generates a pdf file, but I need to save it in a folder already created in Nextcloud using client.Mkcol ("FilesPdf"). But the File.OpenRead function does not work in asp.net core.

client.PutFile ("file.xml", File.OpenRead ("file.xml")); // upload a resource

What I need is to upload the pdf file to the created folder.

@skazantsev
Copy link
Owner

If an account that runs your Asp.Net Core process has necessary permissions it should be possible to read/write files.
If File.OpenRead fails for some reason then the exception usually gives a hint what went wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants