Commit 3ba714d6 authored by Wei Shoulin's avatar Wei Shoulin
Browse files

boto3 inline

parent f276bd9b
......@@ -4,7 +4,6 @@ from io import BytesIO
import os
import logging
import threading
import boto3
from typing import Generator, Any
from urllib.parse import urlparse
from .config import get_storage_config
......@@ -64,6 +63,7 @@ class S3FileStorage(FileStorage):
if not self._is_initialized:
with self._lock:
if not self._is_initialized:
import boto3
self.s3_storage = s3_storage
parsed_url = urlparse(s3_storage)
bucket_name = parsed_url.netloc
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment