Cloud Functions for Firebase是否支持文件操作? [英] Does Cloud Functions for Firebase support file operation?

查看:58
本文介绍了Cloud Functions for Firebase是否支持文件操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个移动应用程序,它使用Firebase作为后端.
我想使用云存储后立即进行压缩="https://firebase.google.com/docs/storage/" rel ="nofollow noreferrer">云功能.

I am developing a mobile app and it is using Firebase as the backend.
I want to compress some files immediately after they are uploaded to the Cloud Storage using Cloud Functions.

因此,我需要将数据写入临时文件,压缩完成后,我要将文件上传到Cloud Storage.

So I need to write data to a temp file and after the compression is done I am going to upload the file to Cloud Storage.

这可能吗? Firebase Cloud Function是否支持文件操作?

Is this possible? Does Firebase Cloud Function support file operation?

推荐答案

是的,您可以在运行函数的实例中写入/tmp.您可以看到使用ImageMagick针对临时对象图像处理的示例文件,以及提供的许多其他示例.

Yes, you can write to /tmp in the instance where your function is running. You can see an example of image manipulation with ImageMagick against a temporary file, along with many other samples that are provided.

这篇关于Cloud Functions for Firebase是否支持文件操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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