Skip to content

Documentation fixes for Microsoft compatibility #10

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

Merged
merged 3 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/docs/getting-started/document-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ class DBDocumentManager extends AbstractDocumentManager

public function put(string $content, array $editorsIds = []): void
{
// calculate content size and hash, be carefull with large contents!
// calculate content size and hash, be careful with large contents!
$size = strlen($content);
$hash = hash('sha256', base64_encode($content));
$hash = base64_encode(hash('sha256', $content, true));
$newVersion = uniqid();

file_put_contents(Storage::disk('public')->path($this->file->path), $content);
Expand Down Expand Up @@ -238,7 +238,7 @@ class DBDocumentManager extends AbstractDocumentManager implements Renameable
Support hashes.

:::caution
Be extra carefull when calculating hashes for large contnet!
Be extra careful when calculating hashes for large content!
:::

Implement `HasHash` interface
Expand Down
9 changes: 8 additions & 1 deletion docs/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ For example

```

## 5-Retrive your document
## 5-Retrieve your document

Query your document manager to get any [supported Document](#) like so

Expand All @@ -147,6 +147,13 @@ Route::get('/', function (Request $request) {

```

## 6-Protect access

To ensure only authorized requests can be made to the laravel-wopi endpoints, use one of the following approaches:

* Register auth middleware in the [configuration](configuration.md).
* Check permissions in the [Document Manager](document-manager.md) manually.

Open your application and voalla!

![Logo](/img/office_docx_app.png)
Expand Down