Files
crm.clientright.ru/crm_extensions/file_storage/node_modules/@aws-sdk/util-user-agent-browser
Fedor 269c7ea216 feat: OnlyOffice Standalone integration with S3 direct URLs
 ЧТО СДЕЛАНО:
- Поднят новый standalone OnlyOffice Document Server (порт 8083)
- Настроен Nginx для доступа через office.clientright.ru:9443
- Создан open_file_v3_standalone.php для работы с новым OnlyOffice
- Реализована поддержка прямых S3 URL (bucket публичный)
- Добавлен s3_proxy.php с поддержкой Range requests
- Создан onlyoffice_callback.php для сохранения (базовая версия)
- Файлы успешно открываются и загружаются!

⚠️ TODO (на завтра):
- Доработать onlyoffice_callback.php для сохранения обратно в ОРИГИНАЛЬНЫЙ путь в S3
- Добавить Redis маппинг documentKey → S3 path
- Обновить CRM JS для использования open_file_v3_standalone.php
- Протестировать сохранение файлов
- Удалить тестовые файлы

📊 РЕЗУЛЬТАТ:
- OnlyOffice Standalone РАБОТАЕТ! 
- Файлы открываются напрямую из S3 
- Редактор загружается БЫСТРО 
- Автосохранение настроено  (но нужна доработка callback)
2025-11-01 01:02:03 +03:00
..

@aws-sdk/util-user-agent-browser

NPM version NPM downloads

Usage

In previous versions of the AWS SDK for JavaScript v3, the AWS SDK user agent header was provided by parsing the navigator user agent string with the bowser library.

This was later changed to browser feature detection using the native Navigator APIs, but if you would like to have the previous functionality, use the following code:

import { createUserAgentStringParsingProvider } from "@aws-sdk/util-user-agent-browser";

import { S3Client } from "@aws-sdk/client-s3";
import pkgInfo from "@aws-sdk/client-s3/package.json";
// or any other client.

const client = new S3Client({
  defaultUserAgentProvider: createUserAgentStringParsingProvider({
    // For a client's serviceId, check the corresponding shared runtimeConfig file
    // https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-s3/src/runtimeConfig.shared.ts
    serviceId: "S3",
    clientVersion: pkgInfo.version,
  }),
});

This usage is not recommended, due to the size of the additional parsing library.