在 OneDrive 或 Google Drive (Heroku) 上保存数据 [英] Saving data on OneDrive or Google Drive (Heroku)

查看:86
本文介绍了在 OneDrive 或 Google Drive (Heroku) 上保存数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我是使用 django 和 heroku 的新手,在设计我的第一个项目时,我发现我需要一个 AWS 3 帐户/S3 存储来存储图像/文件,但我想知道我是否可以使用 OneDrive 或用于保存用户上传的文件/图像的 Google Drive,如果是,是否与使用 AWS 3 存储时一样.

Hello I am new to using django and heroku and through out me designing my first project I Found out that I need a AWS 3 account/S3 storage to store images/files but I was wondering if I could use either a OneDrive or a Google Drive to save the files/images that the user uploads and if so, is it Like when using a AWS 3 storage.

推荐答案

Heroku 有一个临时"硬盘,这意味着您可以将文件写入磁盘,但这些文件在应用程序重新启动后不会持久存在.如果您重新启动 dyno 或部署新版本 (ActiveHeroku 上的存储.

Heroku has an "ephemeral" hard drive, this means that you can write files to disk, but those files will not persist after the application is restarted. You would get them lost in case you restart your dyno or deploy a new release (Active Storage on Heroku.

但您有几种选择来存储您的数据,尽管如此.

But you have a few options to get your data stored although that is the case.

  1. 使用 Herokus 服务之一来执行此操作并为此付费(数据库和数据管理
  2. 使用在 Herokus 市场上提供服务的第三方提供商之一并为此付费(Heroku Add-ons
  3. 使用您个人首选的其他提供此类数据存储服务的提供商之一(例如其中之一:HDrive.

哪些选项适合您的计划取决于您的应用程序和您想要存储的数据类型.您正在使用 sqlite-db 并需要额外的文件存储,并且所有这些都需要迁移到 Heroku:将您的 Django 项目迁移到 Heroku

Which options would fit your plan depends a bit on your application and the kind of data you want to store. You are using a sqlite-db and need an additional file storage and all together needs to be migrated to Heroku: Migrating your Django Project to Heroku

这篇关于在 OneDrive 或 Google Drive (Heroku) 上保存数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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