armedi/unggah

Uploading file to incorrect s3 storage configuration throws inaccurate error.

Closed this issue · 0 comments

url: data.Location || `https://${this.bucketName}.${this._s3.endpoint.host}/${filename}`

Passing a nonexistent bucket or an invalid endpoint to the storage configuration throws an error

Error [TypeError]: Cannot read property 'Location' of undefined

It looks like this happened because it tried to access Location when data is undefined and an error happening while uploading a file to S3.