You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The file upload service of serverpod does not support the China region #2229
Originally posted by Metaildust May 9, 2024
The file upload service of serverpod does not support the China region. China only has AWS service and not Google service. Currently, if the China region wants to use file upload, it can only use S3. But due to the fact that S3 in the Chinese region is represented by Chinese service providers and is independent of the international version. However, using the Chinese version of AWS may encounter some compatibility issues, such as the inability of the Chinese version of AWS service to create a certificate for us east-1. If you create a US-EAST-1 certificate alone in the international zone, you will encounter some other issues. If possible, please support AWS S3 services in China as soon as possible.
I change the US-EAST-1 in tf script to ap-east-1, it seems work but with a little issue occurd in codedeploy phase(I always thought that the yum command used in init-script.sh caused the AWS CodeDeploy failure.).
I'm not familiar with aws,I wan't to konw if there will be problem with selecting ap-east-1 in the international zone.
Additional details in the closed duplicate issue by @Metaildust:
At present, the main storage services supported by ServerPod are Google and AWS. But for Chinese users, due to legal restrictions, data cannot be stored on servers outside of China, which brings some compatibility issues for Chinese users.
The server market in China is mainly dominated by Alibaba Cloud and Tencent Cloud. Although AWS also has branches in China, some features of the international version of AWS are not compatible with AWS in China, and the price of AWS in China is relatively more expensive compared to servers provided by other vendors.
For the China region, the best option is to support Alibaba Cloud's services. Currently, Alibaba Cloud Storage already has package like dart_aliyun_oss(new but strong, works both for serverside or client side, support generate signed url) or like flutter_oss_aliyun(old but more used, designed for client using sts token only, but support multipart upload).
If serverpod is working on add more ability, perhaps we can include Aliyun oss storage services in the serverpod development plan to make it a built-in strategy. It won't be a lot of work rely on dart_aliyun_oss package but extremely user-friendly. Thanks.
@Metaildust This nearly slipped by me, but to not leave it unanswered: we're currently working on a major improvement to the cloud storage implementations on #4771. After this PR is merged, if you want to contribute with the Tencent package that you've built, we'll be happy to have it as an official Serverpod package!
@Metaildust This nearly slipped by me, but to not leave it unanswered: we're currently working on a major improvement to the cloud storage implementations on #4771. After this PR is merged, if you want to contribute with the Tencent package that you've built, we'll be happy to have it as an official Serverpod package!
Hey @Metaildust! We have already merged the improvements to the Cloud storage implementation, so feel free to open your PR with the Tencent COS when you want! Ping @nielsenko on the PR once CI is green and he will take on review.
Initially, I planned to use the current compatibility approach throught s3_compat. However, after doing some research, I realized that it wouldn't achieve perfect compatibility. So instead, I'm going to use the same method that my package currently uses — the official Tencent COS signature approach. This method has been verified in production and is also the recommended way to access Tencent COS.
While this approach will be heavier, it will achieve perfect compatibility.
Activity
MachineL102 commentedon Jun 12, 2024
I change the US-EAST-1 in tf script to ap-east-1, it seems work but with a little issue occurd in codedeploy phase(I always thought that the yum command used in init-script.sh caused the AWS CodeDeploy failure.).
I'm not familiar with aws,I wan't to konw if there will be problem with selecting ap-east-1 in the international zone.
SandPod commentedon Aug 8, 2025
Additional details in the closed duplicate issue by @Metaildust:
Metaildust commentedon Jan 31, 2026
@SandPod
Update: I built and published a Tencent COS CloudStorage adapter that matches Serverpod's official file upload API (createDirectFileUploadDescription / FileUploader)https://pub.dev/packages/serverpod_cloud_storage_cos https://pub.dev/packages/tencent_cos_dart includes a server-side upload endpoint and uses passwords.yaml keys tencentCosSecretId/Key/Bucket/Region/CustomDomain. Happy to maintain for Serverpod 3.x. If you prefer, I can also submit it to serverpod/serverpod_plugins.
marcelomendoncasoares commentedon Feb 26, 2026
@Metaildust This nearly slipped by me, but to not leave it unanswered: we're currently working on a major improvement to the cloud storage implementations on #4771. After this PR is merged, if you want to contribute with the Tencent package that you've built, we'll be happy to have it as an official Serverpod package!
Metaildust commentedon Feb 27, 2026
Hi @marcelomendoncasoares
Let me know here when it's time to propel!
marcelomendoncasoares commentedon Mar 12, 2026
Hey @Metaildust! We have already merged the improvements to the Cloud storage implementation, so feel free to open your PR with the Tencent COS when you want! Ping @nielsenko on the PR once CI is green and he will take on review.
Metaildust commentedon Mar 13, 2026
Hi @marcelomendoncasoares @nielsenko,
I wanted to mention something first.
Initially, I planned to use the current compatibility approach throught
s3_compat. However, after doing some research, I realized that it wouldn't achieve perfect compatibility. So instead, I'm going to use the same method that my package currently uses — the official Tencent COS signature approach. This method has been verified in production and is also the recommended way to access Tencent COS.While this approach will be heavier, it will achieve perfect compatibility.
Metaildust commentedon Mar 13, 2026
pr: #4846