-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
Hi,
we are using S3 adapter for storing our files. Because of our app stores user's data (not public one), we wanted to store data to servers, that are close to users. It means EU users on EU servers, US users on US servers and so on. It also helps us to be GDPR complaint.
We tried to write our custom FIlesAdapter based on existing S3 adapter, but we realised, that it is not possible to get request information in FilesAdapter - we wanted to use client IP address to resolve location through GeoIP.
The proposal
I looked, that this should be relatively easy to inject additional data to FilesAdapter
- in FilesRouter
's createFile
function we can send additional data to filesController
. The FilesAdapter
interface then can be extended by adding request parameter to createFile
function.
Yes, this is breaking change, so that another option is to use options
parameter in createFile
method, that is already here.
Options considered
We were thinking about creating cloudCode function, that will emulate ParseFile functionality - it will get fileName and byte[] data and then store it. However, I am not sure, if it will not have impact on performance - doest Parse File has some special handing for large files upload or so? We will also lost functionality that Parse File provides and break code in our app, that is currently using Parse File.