drive icon indicating copy to clipboard operation
drive copied to clipboard

[Config] local basePath doesn't support full URL like https://example.com/

Open guoyunhe opened this issue 2 years ago • 4 comments

Package version

2.3.0

Node.js and npm version

18.16.0, pnpm 8.2.0

Sample Code (to reproduce the issue)

I use local disk with basePath https://example.com/storage. Then I try to get URL:

const url = await Drive.getUrl('my-photo.png');

It returns:

/https://example.com/storage/my-photo.png

It should return:

https://example.com/storage/my-photo.png

BONUS (a sample repo to reproduce the issue)

guoyunhe avatar May 26 '23 12:05 guoyunhe

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 12 '23 00:08 stale[bot]

keep up

guoyunhe avatar Aug 12 '23 10:08 guoyunhe

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 17 '24 10:03 stale[bot]

keep up

guoyunhe avatar Mar 18 '24 01:03 guoyunhe

Fixed with v6. The fs drive now accepts the appUrl to prefix the app domain https://docs.adonisjs.com/guides/digging-deeper/drive

thetutlage avatar Aug 12 '24 11:08 thetutlage