옵션
집 Skill DevOps 및 CI/CD azure-storage-file-share-ts

azure-storage-file-share-ts

microsoft/skills microsoft/skills

공식 TypeScript/JavaScript SDK를 사용하여 Azure 파일 공유를 관리합니다. 공유, 디렉터리, 파일을 생성하고 삭제하며, 파일을 업로드, 다운로드, 복사하고, 메타데이터와 HTTP 헤더를 설정합니다.

...모든 것을 확장하십시오
0
업데이트 된 시간 2026년 9월 16일

@azure/storage-file-share (TypeScript/JavaScript)

Azure 파일 공유 작업을 위한 SDK — SMB 파일 공유, 디렉토리 및 파일 작업.

설치

npm install @azure/storage-file-share @azure/identity

현재 버전: 12.x
Node.js: >= 18.0.0

환경 변수

AZURE_STORAGE_ACCOUNT_NAME=<account-name>
AZURE_STORAGE_ACCOUNT_KEY=<account-key>
# 또는 연결 문자열 사용
AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=...
AZURE_TOKEN_CREDENTIALS=prod # 프로덕션 환경에서 DefaultAzureCredential을 사용할 경우에만 필요
</account-key></account-name>

인증

연결 문자열 (가장 간단함)

import { ShareServiceClient } from "@azure/storage-file-share";

const client = ShareServiceClient.fromConnectionString(
  process.env.AZURE_STORAGE_CONNECTION_STRING!
);

StorageSharedKeyCredential (Node.js 전용)

import { ShareServiceClient, StorageSharedKeyCredential } from "@azure/storage-file-share";

const accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;
const accountKey = process.env.AZURE_STORAGE_ACCOUNT_KEY!;

const sharedKeyCredential = new StorageSharedKeyCredential(accountName, accountKey);
const client = new ShareServiceClient(
  `https://${accountName}.file.core.windows.net`,
  sharedKeyCredential
);

Microsoft Entra 토큰 자격 증명

import { ShareServiceClient } from "@azure/storage-file-share";
import { DefaultAzureCredential, ManagedIdentityCredential } from "@azure/identity";

// 로컬 개발: DefaultAzureCredential. 프로덕션: AZURE_TOKEN_CREDENTIALS=prod 또는 AZURE_TOKEN_CREDENTIALS=<specific_credential> 설정
const credential = new DefaultAzureCredential({requiredEnvVars: ["AZURE_TOKEN_CREDENTIALS"]});
// 또는 프로덕션에서 특정 자격 증명을 직접 사용:
// https://learn.microsoft.com/javascript/api/overview/azure/identity-readme?view=azure-node-latest#credential-classes 참조
// const credential = new ManagedIdentityCredential();

const accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;
const client = new ShareServiceClient(
  `https://${accountName}.file.core.windows.net`,
  credential
);
</specific_credential>

SAS 토큰

import { ShareServiceClient } from "@azure/storage-file-share";

const accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;
const sasToken = process.env.AZURE_STORAGE_SAS_TOKEN!;

const client = new ShareServiceClient(
  `https://${accountName}.file.core.windows.net${sasToken}`
);

클라이언트 계층 구조

ShareServiceClient (계정 수준)
└── ShareClient (공유 수준)
    └── ShareDirectoryClient (디렉토리 수준)
        └── ShareFileClient (파일 수준)

공유 작업

공유 생성

const shareClient = client.getShareClient("my-share");
await shareClient.create();

// 할당량(GB)과 함께 생성
await shareClient.create({ quota: 100 });

공유 목록 조회

for await (const share of client.listShares()) {
  console.log(share.name, share.properties.quota);
}

// 접두사 필터 적용
for await (const share of client.listShares({ prefix: "logs-" })) {
  console.log(share.name);
}

공유 삭제

await shareClient.delete();

// 존재할 경우 삭제
await shareClient.deleteIfExists();

공유 속성 가져오기

const properties = await shareClient.getProperties();
console.log("할당량:", properties.quota, "GB");
console.log("마지막 수정 시간:", properties.lastModified);

공유 할당량 설정

await shareClient.setQuota(200); // 200 GB

디렉토리 작업

디렉토리 생성

const directoryClient = shareClient.getDirectoryClient("my-directory");
await directoryClient.create();

// 중첩 디렉토리 생성
const nestedDir = shareClient.getDirectoryClient("parent/child/grandchild");
await nestedDir.create();

디렉토리 및 파일 목록 조회

const directoryClient = shareClient.getDirectoryClient("my-directory");

for await (const item of directoryClient.listFilesAndDirectories()) {
  if (item.kind === "directory") {
    console.log(`[DIR] ${item.name}`);
  } else {
    console.log(`[FILE] ${item.name} (${item.properties.contentLength} bytes)`);
  }
}

디렉토리 삭제

await directoryClient.delete();

// 존재할 경우 삭제
await directoryClient.deleteIfExists();

디렉토리 존재 여부 확인

const exists = await directoryClient.exists();
if (!exists) {
  await directoryClient.create();
}

파일 작업

파일 업로드 (간단한 방식)

const fileClient = shareClient
  .getDirectoryClient("my-directory")
  .getFileClient("my-file.txt");

// 문자열 업로드
const content = "Hello, World!";
await fileClient.create(content.length);
await fileClient.uploadRange(content, 0, content.length);

파일 업로드 (Node.js - 로컬 파일에서)

import * as fs from "fs";
import * as path from "path";

const fileClient = shareClient.rootDirectoryClient.getFileClient("uploaded.txt");
const localFilePath = "/path/to/local/file.txt";
const fileSize = fs.statSync(localFilePath).size;

await fileClient.create(fileSize);
await fileClient.uploadFile(localFilePath);

파일 업로드 (Buffer)

const buffer = Buffer.from("Hello, Azure Files!");
const fileClient = shareClient.rootDirectoryClient.getFileClient("buffer-file.txt");

await fileClient.create(buffer.length);
await fileClient.uploadRange(buffer, 0, buffer.length);

파일 업로드 (Stream)

import * as fs from "fs";

const fileClient = shareClient.rootDirectoryClient.getFileClient("streamed.txt");
const readStream = fs.createReadStream("/path/to/local/file.txt");
const fileSize = fs.statSync("/path/to/local/file.txt").size;

await fileClient.create(fileSize);
await fileClient.uploadStream(readStream, fileSize, 4 * 1024 * 1024, 4); // 4MB 버퍼, 4 병렬 처리

파일 다운로드

const fileClient = shareClient
  .getDirectoryClient("my-directory")
  .getFileClient("my-file.txt");

const downloadResponse = await fileClient.download();

// 문자열로 읽기
const chunks: Buffer[] = [];
for await (const chunk of downloadResponse.readableStreamBody!) {
  chunks.push(Buffer.from(chunk));
}
const content = Buffer.concat(chunks).toString("utf-8");

파일로 다운로드 (Node.js)

const fileClient = shareClient.rootDirectoryClient.getFileClient("my-file.txt");
await fileClient.downloadToFile("/path/to/local/destination.txt");

Buffer로 다운로드 (Node.js)

const fileClient = shareClient.rootDirectoryClient.getFileClient("my-file.txt");
const buffer = await fileClient.downloadToBuffer();
console.log(buffer.toString());

파일 삭제

const fileClient = shareClient.rootDirectoryClient.getFileClient("my-file.txt");
await fileClient.delete();

// 존재할 경우 삭제
await fileClient.deleteIfExists();

파일 복사

const sourceUrl = "https://account.file.core.windows.net/share/source.txt";
const destFileClient = shareClient.rootDirectoryClient.getFileClient("destination.txt");

// 복사 작업 시작
const copyPoller = await destFileClient.startCopyFromURL(sourceUrl);
await copyPoller.pollUntilDone();

파일 속성 및 메타데이터

파일 속성 가져오기

const fileClient = shareClient.rootDirectoryClient.getFileClient("my-file.txt");
const properties = await fileClient.getProperties();

console.log("Content-Length:", properties.contentLength);
console.log("Content-Type:", properties.contentType);
console.log("마지막 수정 시간:", properties.lastModified);
console.log("ETag:", properties.etag);

메타데이터 설정

await fileClient.setMetadata({
  author: "John Doe",
  category: "documents",
});

HTTP 헤더 설정

await fileClient.setHttpHeaders({
  fileContentType: "text/plain",
  fileCacheControl: "max-age=3600",
  fileContentDisposition: "attachment; filename=download.txt",
});

범위 작업

범위 업로드

const data = Buffer.from("partial content");
await fileClient.uploadRange(data, 100, data.length); // 오프셋 100에 쓰기

범위 다운로드

const downloadResponse = await fileClient.download(100, 50); // 오프셋 100, 길이 50

범위 지우기

await fileClient.clearRange(0, 100); // 첫 100바이트 지우기

스냅샷 작업

스냅샷 생성

const snapshotResponse = await shareClient.createSnapshot();
console.log("스냅샷:", snapshotResponse.snapshot);

스냅샷 액세스

const snapshotShareClient = shareClient.withSnapshot(snapshotResponse.snapshot!);
const snapshotFileClient = snapshotShareClient.rootDirectoryClient.getFileClient("file.txt");
const content = await snapshotFileClient.downloadToBuffer();

스냅샷 삭제

await shareClient.delete({ deleteSnapshots: "include" });

SAS 토큰 생성 (Node.js 전용)

파일 SAS 생성

import {
  generateFileSASQueryParameters,
  FileSASPermissions,
  StorageSharedKeyCredential,
} from "@azure/storage-file-share";

const sharedKeyCredential = new StorageSharedKeyCredential(accountName, accountKey);

const sasToken = generateFileSASQueryParameters(
  {
    shareName: "my-share",
    filePath: "my-directory/my-file.txt",
    permissions: FileSASPermissions.parse("r"), // 읽기 전용
    expiresOn: new Date(Date.now() + 3600 * 1000), // 1시간
  },
  sharedKeyCredential
).toString();

const sasUrl = `https://${accountName}.file.core.windows.net/my-share/my-directory/my-file.txt?${sasToken}`;

공유 SAS 생성

import { ShareSASPermissions, generateFileSASQueryParameters } from "@azure/storage-file-share";

const sasToken = generateFileSASQueryParameters(
  {
    shareName: "my-share",
    permissions: ShareSASPermissions.parse("rcwdl"), // 읽기, 생성, 쓰기, 삭제, 목록 조회
    expiresOn: new Date(Date.now() + 24 * 3600 * 1000), // 24시간
  },
  sharedKeyCredential
).toString();

오류 처리

import { RestError } from "@azure/storage-file-share";

try {
  await shareClient.create();
} catch (error) {
  if (error instanceof RestError) {
    switch (error.statusCode) {
      case 404:
        console.log("공유를 찾을 수 없음");
        break;
      case 409:
        console.log("공유가 이미 존재함");
        break;
      case 403:
        console.log("접근 거부됨");
        break;
      default:
        console.error(`저장소 오류 ${error.statusCode}: ${error.message}`);
    }
  }
  throw error;
}

TypeScript 타입 참조

import {
  // 클라이언트
  ShareServiceClient,
  ShareClient,
  ShareDirectoryClient,
  ShareFileClient,

  // 인증
  StorageSharedKeyCredential,
  AnonymousCredential,

  // SAS
  FileSASPermissions,
  ShareSASPermissions,
  AccountSASPermissions,
  AccountSASServices,
  AccountSASResourceTypes,
  generateFileSASQueryParameters,
  generateAccountSASQueryParameters,

  // 옵션 및 응답
  ShareCreateResponse,
  FileDownloadResponseModel,
  DirectoryItem,
  FileItem,
  ShareProperties,
  FileProperties,

  // 오류
  RestError,
} from "@azure/storage-file-share";

모범 사례

  1. 단순성을 위해 연결 문자열 사용 — 개발 환경에서 가장 쉬운 설정
  2. 로컬 개발에는 DefaultAzureCredential 사용; 프로덕션에는 ManagedIdentityCredential 또는 WorkloadIdentityCredential 사용
  3. 공유에 할당량 설정 — 예기치 않은 저장소 비용 방지
  4. 대용량 파일에는 스트리밍 사용 — 256MB 이상 파일의 경우 uploadStream/downloadToFile 사용
  5. 부분 업데이트에는 범위 사용 — 전체 파일 교체보다 효율적
  6. 주요 변경 전 스냅샷 생성 — 특정 시점 복구 가능
  7. 오류를 우아하게 처리 — 구체적인 처리를 위해 RestError.statusCode 확인
  8. *`IfExists` 메서드 사용** — 멱등성 연산을 위해

플랫폼 차이점

기능Node.js브라우저
`StorageSharedKeyCredential`
`uploadFile()`
`uploadStream()`
`downloadToFile()`
`downloadToBuffer()`
SAS 생성
DefaultAzureCredential
익명/SAS 액세스
GitHub에서 보기
---
name: azure-storage-file-share-ts
description: Manage Azure File Shares using the official TypeScript/JavaScript SDK. Create and delete shares, directories, and files; upload, download, and copy files; set metadata and HTTP headers.
license: MIT
---

# @azure/storage-file-share (TypeScript/JavaScript)

SDK for Azure File Share operations — SMB file shares, directories, and file operations.

## Installation

```bash
npm install @azure/storage-file-share @azure/identity
```

**Current Version**: 12.x  
**Node.js**: >= 18.0.0

## Environment Variables

```bash
AZURE_STORAGE_ACCOUNT_NAME=<account-name>
AZURE_STORAGE_ACCOUNT_KEY=<account-key>
# OR connection string
AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=...
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
```

## Authentication

### Connection String (Simplest)

```typescript
import { ShareServiceClient } from "@azure/storage-file-share";

const client = ShareServiceClient.fromConnectionString(
  process.env.AZURE_STORAGE_CONNECTION_STRING!
);
```

### StorageSharedKeyCredential (Node.js only)

```typescript
import { ShareServiceClient, StorageSharedKeyCredential } from "@azure/storage-file-share";

const accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;
const accountKey = process.env.AZURE_STORAGE_ACCOUNT_KEY!;

const sharedKeyCredential = new StorageSharedKeyCredential(accountName, accountKey);
const client = new ShareServiceClient(
  `https://${accountName}.file.core.windows.net`,
  sharedKeyCredential
);
```

### Microsoft Entra Token Credential

```typescript
import { ShareServiceClient } from "@azure/storage-file-share";
import { DefaultAzureCredential, ManagedIdentityCredential } from "@azure/identity";

// Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential>
const credential = new DefaultAzureCredential({requiredEnvVars: ["AZURE_TOKEN_CREDENTIALS"]});
// Or use a specific credential directly in production:
// See https://learn.microsoft.com/javascript/api/overview/azure/identity-readme?view=azure-node-latest#credential-classes
// const credential = new ManagedIdentityCredential();

const accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;
const client = new ShareServiceClient(
  `https://${accountName}.file.core.windows.net`,
  credential
);
```

### SAS Token

```typescript
import { ShareServiceClient } from "@azure/storage-file-share";

const accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;
const sasToken = process.env.AZURE_STORAGE_SAS_TOKEN!;

const client = new ShareServiceClient(
  `https://${accountName}.file.core.windows.net${sasToken}`
);
```

## Client Hierarchy

```
ShareServiceClient (account level)
└── ShareClient (share level)
    └── ShareDirectoryClient (directory level)
        └── ShareFileClient (file level)
```

## Share Operations

### Create Share

```typescript
const shareClient = client.getShareClient("my-share");
await shareClient.create();

// Create with quota (in GB)
await shareClient.create({ quota: 100 });
```

### List Shares

```typescript
for await (const share of client.listShares()) {
  console.log(share.name, share.properties.quota);
}

// With prefix filter
for await (const share of client.listShares({ prefix: "logs-" })) {
  console.log(share.name);
}
```

### Delete Share

```typescript
await shareClient.delete();

// Delete if exists
await shareClient.deleteIfExists();
```

### Get Share Properties

```typescript
const properties = await shareClient.getProperties();
console.log("Quota:", properties.quota, "GB");
console.log("Last Modified:", properties.lastModified);
```

### Set Share Quota

```typescript
await shareClient.setQuota(200); // 200 GB
```

## Directory Operations

### Create Directory

```typescript
const directoryClient = shareClient.getDirectoryClient("my-directory");
await directoryClient.create();

// Create nested directory
const nestedDir = shareClient.getDirectoryClient("parent/child/grandchild");
await nestedDir.create();
```

### List Directories and Files

```typescript
const directoryClient = shareClient.getDirectoryClient("my-directory");

for await (const item of directoryClient.listFilesAndDirectories()) {
  if (item.kind === "directory") {
    console.log(`[DIR] ${item.name}`);
  } else {
    console.log(`[FILE] ${item.name} (${item.properties.contentLength} bytes)`);
  }
}
```

### Delete Directory

```typescript
await directoryClient.delete();

// Delete if exists
await directoryClient.deleteIfExists();
```

### Check if Directory Exists

```typescript
const exists = await directoryClient.exists();
if (!exists) {
  await directoryClient.create();
}
```

## File Operations

### Upload File (Simple)

```typescript
const fileClient = shareClient
  .getDirectoryClient("my-directory")
  .getFileClient("my-file.txt");

// Upload string
const content = "Hello, World!";
await fileClient.create(content.length);
await fileClient.uploadRange(content, 0, content.length);
```

### Upload File (Node.js - from local file)

```typescript
import * as fs from "fs";
import * as path from "path";

const fileClient = shareClient.rootDirectoryClient.getFileClient("uploaded.txt");
const localFilePath = "/path/to/local/file.txt";
const fileSize = fs.statSync(localFilePath).size;

await fileClient.create(fileSize);
await fileClient.uploadFile(localFilePath);
```

### Upload File (Buffer)

```typescript
const buffer = Buffer.from("Hello, Azure Files!");
const fileClient = shareClient.rootDirectoryClient.getFileClient("buffer-file.txt");

await fileClient.create(buffer.length);
await fileClient.uploadRange(buffer, 0, buffer.length);
```

### Upload File (Stream)

```typescript
import * as fs from "fs";

const fileClient = shareClient.rootDirectoryClient.getFileClient("streamed.txt");
const readStream = fs.createReadStream("/path/to/local/file.txt");
const fileSize = fs.statSync("/path/to/local/file.txt").size;

await fileClient.create(fileSize);
await fileClient.uploadStream(readStream, fileSize, 4 * 1024 * 1024, 4); // 4MB buffer, 4 concurrency
```

### Download File

```typescript
const fileClient = shareClient
  .getDirectoryClient("my-directory")
  .getFileClient("my-file.txt");

const downloadResponse = await fileClient.download();

// Read as string
const chunks: Buffer[] = [];
for await (const chunk of downloadResponse.readableStreamBody!) {
  chunks.push(Buffer.from(chunk));
}
const content = Buffer.concat(chunks).toString("utf-8");
```

### Download to File (Node.js)

```typescript
const fileClient = shareClient.rootDirectoryClient.getFileClient("my-file.txt");
await fileClient.downloadToFile("/path/to/local/destination.txt");
```

### Download to Buffer (Node.js)

```typescript
const fileClient = shareClient.rootDirectoryClient.getFileClient("my-file.txt");
const buffer = await fileClient.downloadToBuffer();
console.log(buffer.toString());
```

### Delete File

```typescript
const fileClient = shareClient.rootDirectoryClient.getFileClient("my-file.txt");
await fileClient.delete();

// Delete if exists
await fileClient.deleteIfExists();
```

### Copy File

```typescript
const sourceUrl = "https://account.file.core.windows.net/share/source.txt";
const destFileClient = shareClient.rootDirectoryClient.getFileClient("destination.txt");

// Start copy operation
const copyPoller = await destFileClient.startCopyFromURL(sourceUrl);
await copyPoller.pollUntilDone();
```

## File Properties & Metadata

### Get File Properties

```typescript
const fileClient = shareClient.rootDirectoryClient.getFileClient("my-file.txt");
const properties = await fileClient.getProperties();

console.log("Content-Length:", properties.contentLength);
console.log("Content-Type:", properties.contentType);
console.log("Last Modified:", properties.lastModified);
console.log("ETag:", properties.etag);
```

### Set Metadata

```typescript
await fileClient.setMetadata({
  author: "John Doe",
  category: "documents",
});
```

### Set HTTP Headers

```typescript
await fileClient.setHttpHeaders({
  fileContentType: "text/plain",
  fileCacheControl: "max-age=3600",
  fileContentDisposition: "attachment; filename=download.txt",
});
```

## Range Operations

### Upload Range

```typescript
const data = Buffer.from("partial content");
await fileClient.uploadRange(data, 100, data.length); // Write at offset 100
```

### Download Range

```typescript
const downloadResponse = await fileClient.download(100, 50); // offset 100, length 50
```

### Clear Range

```typescript
await fileClient.clearRange(0, 100); // Clear first 100 bytes
```

## Snapshot Operations

### Create Snapshot

```typescript
const snapshotResponse = await shareClient.createSnapshot();
console.log("Snapshot:", snapshotResponse.snapshot);
```

### Access Snapshot

```typescript
const snapshotShareClient = shareClient.withSnapshot(snapshotResponse.snapshot!);
const snapshotFileClient = snapshotShareClient.rootDirectoryClient.getFileClient("file.txt");
const content = await snapshotFileClient.downloadToBuffer();
```

### Delete Snapshot

```typescript
await shareClient.delete({ deleteSnapshots: "include" });
```

## SAS Token Generation (Node.js only)

### Generate File SAS

```typescript
import {
  generateFileSASQueryParameters,
  FileSASPermissions,
  StorageSharedKeyCredential,
} from "@azure/storage-file-share";

const sharedKeyCredential = new StorageSharedKeyCredential(accountName, accountKey);

const sasToken = generateFileSASQueryParameters(
  {
    shareName: "my-share",
    filePath: "my-directory/my-file.txt",
    permissions: FileSASPermissions.parse("r"), // read only
    expiresOn: new Date(Date.now() + 3600 * 1000), // 1 hour
  },
  sharedKeyCredential
).toString();

const sasUrl = `https://${accountName}.file.core.windows.net/my-share/my-directory/my-file.txt?${sasToken}`;
```

### Generate Share SAS

```typescript
import { ShareSASPermissions, generateFileSASQueryParameters } from "@azure/storage-file-share";

const sasToken = generateFileSASQueryParameters(
  {
    shareName: "my-share",
    permissions: ShareSASPermissions.parse("rcwdl"), // read, create, write, delete, list
    expiresOn: new Date(Date.now() + 24 * 3600 * 1000), // 24 hours
  },
  sharedKeyCredential
).toString();
```

## Error Handling

```typescript
import { RestError } from "@azure/storage-file-share";

try {
  await shareClient.create();
} catch (error) {
  if (error instanceof RestError) {
    switch (error.statusCode) {
      case 404:
        console.log("Share not found");
        break;
      case 409:
        console.log("Share already exists");
        break;
      case 403:
        console.log("Access denied");
        break;
      default:
        console.error(`Storage error ${error.statusCode}: ${error.message}`);
    }
  }
  throw error;
}
```

## TypeScript Types Reference

```typescript
import {
  // Clients
  ShareServiceClient,
  ShareClient,
  ShareDirectoryClient,
  ShareFileClient,

  // Authentication
  StorageSharedKeyCredential,
  AnonymousCredential,

  // SAS
  FileSASPermissions,
  ShareSASPermissions,
  AccountSASPermissions,
  AccountSASServices,
  AccountSASResourceTypes,
  generateFileSASQueryParameters,
  generateAccountSASQueryParameters,

  // Options & Responses
  ShareCreateResponse,
  FileDownloadResponseModel,
  DirectoryItem,
  FileItem,
  ShareProperties,
  FileProperties,

  // Errors
  RestError,
} from "@azure/storage-file-share";
```

## Best Practices

1. **Use connection strings for simplicity** — Easiest setup for development
2. **Use `DefaultAzureCredential` for local development; use `ManagedIdentityCredential` or `WorkloadIdentityCredential` for production**
3. **Set quotas on shares** — Prevent unexpected storage costs
4. **Use streaming for large files** — `uploadStream`/`downloadToFile` for files > 256MB
5. **Use ranges for partial updates** — More efficient than full file replacement
6. **Create snapshots before major changes** — Point-in-time recovery
7. **Handle errors gracefully** — Check `RestError.statusCode` for specific handling
8. **Use `*IfExists` methods** — For idempotent operations

## Platform Differences

| Feature | Node.js | Browser |
|---------|---------|---------|
| `StorageSharedKeyCredential` | ✅ | ❌ |
| `uploadFile()` | ✅ | ❌ |
| `uploadStream()` | ✅ | ❌ |
| `downloadToFile()` | ✅ | ❌ |
| `downloadToBuffer()` | ✅ | ❌ |
| SAS generation | ✅ | ❌ |
| DefaultAzureCredential | ✅ | ❌ |
| Anonymous/SAS access | ✅ | ✅ |

모든 파일

1개 파일

azure-storage-file-share-ts 설치

스킬 파일을 다운로드하여 .claude/skills/ 디렉토리에 추출하세요.

ZIP 다운로드

저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.

git clone https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-typescript/skills/azure-storage-file-share-ts # Copy SKILL.md to your .claude/skills/ directory

복사 복사
빠른 설정: 스킬 폴더를 .claude/skills/에 복사하세요. Claude가 자동으로 감지하고 사용합니다.
저장소 microsoft/skills

관련 스킬

base44-cli
업데이트 된 시간 2026년 6월 29일
klingai-upgrade-migration
업데이트 된 시간 2026년 7월 3일
Railway CLI Management
업데이트 된 시간 2026년 7월 2일
Verification &amp; Quality Assurance
업데이트 된 시간 2026년 6월 29일
OR