Tell Pocketbase to pick up a file already at the storage location without going through the API #4858
-
I'm using Pocketbase to build a new PoC product and it has been wonderful so far for a solo developer. My app needs to handle large file uploading (100MB-500MB) and I would like to add resumable uploading capability to the frontend. My plan is using tusd + uppy for this function. They seems to be well-tested, have wide-spread support and backed by a big company who are actively developing and dogfooding. Planned implementation workflow: I've read your reply on another discussion thread on how to programmatically adding a file but as I understand it, this mean downloading and reuploading to the same location. Given that I have the ability to directly save the file to the S3 location, I would like to somehow tell Pocketbase that the file is already present, I've gone with the route of extending Pocketbase using golang. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In the database we store only the record file name. If you have uploaded the file externally in record.Set("yourFileField", "file_name_random10chars.ext")
app.Dao().SaveRecord(record) |
Beta Was this translation helpful? Give feedback.
In the database we store only the record file name. If you have uploaded the file externally in
/collectionId/recordId/file_name_random10chars.ext
location then in this case you can directly set the name of the file as your record field value.