33 lines
812 B
Markdown
33 lines
812 B
Markdown
# Sharepoint File Uploader
|
|
Upload a file to sharepoint
|
|
|
|
## Compile from source
|
|
Install Golang and run `go build`. You can use the generated binary `sharepoint-upload`.
|
|
|
|
# Installation
|
|
## Binary (Linux)
|
|
Copy the binary `sharepoint-upload` and execute it.
|
|
|
|
# Usage
|
|
|
|
Set `SP_PASSWORD` environment variable.
|
|
```
|
|
sharepoint-upload -f filename
|
|
```
|
|
|
|
Use `-h` to see more available options (like setting the directory).
|
|
```
|
|
$ ./sharepoint-upload -h
|
|
Usage of ./sharepoint-upload:
|
|
-d string
|
|
The directory on Sharepoint (default "Reports")
|
|
-f string
|
|
The file to upload
|
|
-overwrite
|
|
Specify if existing files should be overwritten
|
|
-s string
|
|
The Sharepoint site url (default "https://michuit.sharepoint.com/sites/csi")
|
|
-u string
|
|
The user for Sharepoint (default "michael")
|
|
```
|