mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge branch '1.8.x' into ser-1103-repositories
This commit is contained in:
@@ -481,7 +481,6 @@ class Migrations extends Action
|
||||
array $platform,
|
||||
Authorization $authorization,
|
||||
): void {
|
||||
$credentials = $migration->getAttribute('credentials', []);
|
||||
$options = $migration->getAttribute('options', []);
|
||||
$bucketId = 'default'; // Always use platform default bucket
|
||||
$filename = $options['filename'] ?? 'export_' . \time();
|
||||
@@ -577,8 +576,11 @@ class Migrations extends Action
|
||||
]);
|
||||
|
||||
// Generate download URL with JWT
|
||||
$endpoint = System::getEnv('_APP_DOMAIN', '');
|
||||
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS', 'disabled') === 'enabled' ? 'https' : 'http';
|
||||
|
||||
$downloadUrl = "{$protocol}://{$endpoint}/v1/storage/buckets/{$bucketId}/files/{$fileId}/push?project={$project->getId()}&jwt={$jwt}";
|
||||
|
||||
$downloadUrl = "{$credentials['endpoint']}/storage/buckets/{$bucketId}/files/{$fileId}/push?project={$project->getId()}&jwt={$jwt}";
|
||||
$options['downloadUrl'] = $downloadUrl;
|
||||
$migration->setAttribute('options', $options);
|
||||
$this->updateMigrationDocument($migration, $project, $queueForRealtime);
|
||||
|
||||
Reference in New Issue
Block a user