# Considerations & FAQs
Temporary storage space
In the runtime environment of each cloud function, a 512MB
temporary disk space is provided under the /tmp
directory to process read and write requests for temporary files in a single execution of cloud function. Please note that this temporary disk space may be destroyed after the function is executed, so you should not assume that temporary files stored in the disk space are always available. Use the cloud storage feature for persistent storage.
User code directory:__dirname
During the execution of a cloud function, the root directory of the current cloud function can be obtained __dirname
. If there is a resource file uploaded with the cloud function, it can be obtained via __dirname
and the relevant path reference.
Node.js native dependency
If a platform-related native dependency is used, the dependency must be compiled under the corresponding platform (Windows/macOS/Linux). Be sure to compile it on a Linux platform (CentOS 7 preferable) before uploading it. Otherwise, an environmental compatibility problem may occur.