
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
payloadcms-ftp-storage
Advanced tools
FTP adapter for Payload CMS's plugin-cloud-storage plugin
This adapter uses basic-ftp to handle the FTP operations.
Let's say we have a Videos
collection (which slug is "videos") and we want to store the uploads on a third-party remote storage using FTP.
At the top of your payload.config.ts
file, add the following:
import { ftpAdapter } from "payloadcms-ftp-storage";
Then within the buildConfig
add the following:
plugins: [
cloudStorage({
collections: {
videos: {
adapter: ftpAdapter({
host: "ftp.domain.com",
user: "ftpUser",
password: "ftpUserPassword",
secure: true,
endpoint: "https://domain.com/videos",
}),
disableLocalStorage: true,
disablePayloadAccessControl: true,
},
},
}),
],
If we upload a video file name "my-video.mp4", the file will be uploaded at the home of "ftpUser" at "ftp.domain.com", in a subfolder named "videos" (because this is the slug of the collection) as a file with the same name as the original "my-video.mp4". In conclusion, the path of the transfered file will be ~/videos/my-video.mp4
, and its public address will be https://domain.com/videos/my-video.mp4
Beware: when deleting an entry, the file will also be deleted on the remote storage. Also, if a file "my-video.mp4" already exists, and we try to upload another file with the same name, the original file will be overwritten.
FAQs
FTP adapter for Payload CMS's plugin-cloud-storage plugin
We found that payloadcms-ftp-storage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.