解析关于图像的迁移到 heroku/aws [英] Parse migration to heroku/aws regarding the image

查看:28
本文介绍了解析关于图像的迁移到 heroku/aws的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已成功将解析数据库迁移到 aws,但图像文件的 url 仍然像

为了直接回答您的问题,我们正在制定积极的解决方案,并且这是迁移后迁移和可选解析文件存储选项的最新解决方案.

如何将我的旧 Parse 文件迁移到 Parse Sever?将旧的 Parse 文件从 Parse 拥有的 S3 存储桶迁移到开发者拥有的 Parse Sever:https://github.com/ParsePlatform/parse-server/issues/8

在迁移到 Parse Server 后,我有哪些非数据库选项来存储我的 Parse 文件?添加支持通过运行解析服务器的 S3 适配器将解析文件直接上传到 Amazon Simple Storage (S3):https://github.com/ParsePlatform/parse-server/pull/113

解析文件的迁移注意事项:当用户第一次上传文件时,解析服务会将其上传到 files.parsetfss.com 并以直接指向该文件的链接作为响应.此时,在 Parse Core 或其他数据类中没有引用此文件对象的 POINTER 或 METADATA.开发人员需要在他们自己的数据类中保留对该文件的引用,或者进行另一个 API 调用以创建对象或更新现有对象并将解析文件与该对象相关联.否则,该文件是孤立的.Parse 确实允许您在应用程序的应用程序设置中清理文件".此选项将删除未被任何对象引用的任何文件.孤立文件只能使用主密钥删除,目前无法搜索每个帐户或应用程序上传的所有解析文件,除非它与类对象相关联.

在迁移到 Parse Server 的过程中,EXISTING Parse Files 会发生什么变化?在迁移过程中,文件保留在 Parse 的 S3 存储桶中,但新迁移的 Parse Server 知道如何在迁移后继续为它们提供服务.没有文件被迁移!仅指向 Parse 拥有的 S3 存储桶的指针,并且仅当这些文件与对象关联时.因此,如果开发人员没有在 2017 年 Parse 关闭之前从 Parse 迁移遗留"预迁移解析文件,他们可能无法访问这些文件.Parse 和开源 Parse Server 社区正在积极致力于提供迁移解决方案.请参阅此处.

迁移到解析服务器后上传的新解析文件会怎样?迁移后上传到解析服务器的新解析文件托管在MongoDB GridStore(Mongo).Parse 仅托管通过 api.parse.com API 端点上传的文件.换句话说,如果您将应用程序迁移到 Parse Server,但尚未更新客户端以使用新的 Parse Server API 端点,则这些 Parse 文件仍将上传到 Parse 拥有的 S3 存储桶.对于使用新的 Parse Server API 端点上传解析文件的客户端,这些文件将直接存储到开发人员的 MongoDB 数据库中.

希望这些信息对您有用.

I have successfully migrated my parse db to aws but the urls of image files still like http://files.parsetfss.com/77447afb-f681-4b55-afad-6bceeb2e155a/tfss-79297c86-bd48-4d7f-87ab-c43e02d1a8f3-photo.png

it means files are still on parse s3 cloud or something their own storage so what will happen to those files after parse shutdown. what is the way to migrate the images to new database/storage on my own AWS. I am worried because I have apprx 14.5 k images on parse.

Please provide you valuable guidance on this.

解决方案

As you know, Parse Files is a feature allowing developers to upload files (up to 10 megabytes each) and reference those files from objects in Parse Core data classes or directly by URL provided in the API response from Parse.

Behind-the-scenes, Parse is uploading your files to a Parse-owned S3 bucket (files.parsetfss.com) and prefixing the file objects with your application "File key".

To answer your questions directly, there's active solutions in-the-works and here’s the latest addressing the migration and optional Parse File storage options post migration.

How do I migrated my legacy Parse Files over to Parse Sever? Migrating legacy Parse Files from Parse-owned S3 bucket to developer-owned Parse Sever: https://github.com/ParsePlatform/parse-server/issues/8

What NON database options do I have for storing my Parse Files after migrating to Parse Server? Add support to upload Parse Files directly to Amazon Simple Storage (S3) via S3 adapter running Parse Server: https://github.com/ParsePlatform/parse-server/pull/113

Migration Considerations for Parse Files: When a user first uploads a file, Parse service uploads it to files.parsetfss.com and responds with a link directly to the file. At this point, there is NO POINTER or METADATA referencing this file object in Parse Core or other data classes. The developer would need to keep a reference to this file in their own data class OR make another API call to create an object or update an existing object and associate the Parse File with that object. Otherwise, the file is orphaned. Parse does allow you to "Clean Up Files" in the App Settings of your application. This option will delete any files that are not referenced by any objects. Orphaned files can only be deleted by using the Master Key and there is currently no way to search ALL your uploaded Parse Files per account or application unless it’s associated with a class object.

What happens to EXISTING Parse Files during the migration to Parse Server? During the migration, the files stay on Parse's S3 bucket, but the newly migrated Parse Server knows how to continue serving them up post migration. NO FILES HAVE BEEN MIGRATED! Only the pointers to the S3 bucket owned by Parse AND only if those files are associated with an object. So, if the developer DOES NOT MIGRATE the "legacy" pre-migration Parse Files from Parse prior to Parse shutdown in 2017, they could lose access to these files. Parse and the open source Parse Server community is ACTIVELY working on providing migration solutions. See here.

What happens to NEW Parse Files uploaded after the migration to Parse Server? New Parse Files uploaded to a Parse Server after migration are hosted in MongoDB GridStore(Mongo). Only files uploaded through api.parse.com API endpoint are hosted by Parse. In other words, if you migrated your app to Parse Server but have not updated the clients to use the new Parse Server API endpoint, those Parse Files will still get uploaded to the Parse owned S3 bucket. For those clients that upload Parse Files using their new Parse Server API endpoint, the files will be stored directly into the developers MongoDB database.

I hope you found this information useful.

这篇关于解析关于图像的迁移到 heroku/aws的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆