You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.
Problem
Returning response.Location is limiting the app to know only that property of the result.
In cases where you're using different endpoints (for example, switching between s3 and minio servers for development), I'd rather use response.Key as the reference in DB, and then dynamically set the endpoint depending on the environment.
Also, it could be considered to implement a common response object for all drivers, so you can expect always the same properties depending on which operation has been made, independently of the driver.
For instance: await Drive.put() could return a response object like
constresponse=awaitDrive.disk('s3').put(name,content,params)response.location// full url (can be empty for local storage)response.path// same as aws s3 response.Key - /bucket/prefix/file.jpgresponse.status// 200response.response// underlying response object if exists
The text was updated successfully, but these errors were encountered:
Hello, I'll put this "on hold" on my part until a solution for a compact testing environment is found (docker image?)
Should I open a separate issue to track that?
https://github.com/Slynova-Org/node-flydrive/blob/aea96ae1bc2995a4772391c3dc81682f9f63e500/src/Drivers/AwsS3.js#L107
Problem
Returning
response.Location
is limiting the app to know only that property of the result.In cases where you're using different endpoints (for example, switching between s3 and minio servers for development), I'd rather use
response.Key
as the reference in DB, and then dynamically set the endpoint depending on the environment.For example,
putObject
is doing it just finehttps://github.com/Slynova-Org/node-flydrive/blob/aea96ae1bc2995a4772391c3dc81682f9f63e500/src/Drivers/AwsS3.js#L163
Also, it could be considered to implement a common response object for all drivers, so you can expect always the same properties depending on which operation has been made, independently of the driver.
For instance:
await Drive.put()
could return a response object likeThe text was updated successfully, but these errors were encountered: