-
-
Notifications
You must be signed in to change notification settings - Fork 3
Change Backends Request::Import
api
#13
Comments
probably uploading the file and sending it to the backend is the most reliable to work |
Yeah, that's what I would go with. |
It would need a new deltachat-core API to support our use case because we currently only have a function to import by file-path and not with a blob. Since it's literally just 5 lines of code with ndf-rs instead of implementing a new core-API with WebSockets etc. I would prefer to implement the second option I explained here. |
While that is a nice option it will prevent us from using this in the browser remotely, which is why I think we should do the work of sending the file |
Holga told me we are pretty far away from compiling dc-core to web assembly, so we will still need the backend. If that's the case then there is no difference in sending the file from frontend vs. opening it from the backend, right? |
there is, when we serve the frontend from a mobile device, we can only use the backend on the phone, and the browsers capabilities |
yeah makes sense - didn't know we want to support devices other then desktop |
The current api needs two strings from the frontend, an email, and a path to the backup file. The problem is that the current browser file-API does not generate full paths of files because of privacy issues, instead, you get something like
C:\\fakepath\\IMG_0138.JPG
with which you can't open the backup file from the backend.Because of this, I request that we change the api and either send the full file from frontend->backend or we remove the
path
field from the request and open a file-explorer from within the backend to choose the backup file. In this scenario, the frontend would only play the role of a "notifier".What do you think is the best solution?
The text was updated successfully, but these errors were encountered: