Skip to content

Commit d140da7

Browse files
committed
fix: download call not authorized error fix
1 parent c4111ae commit d140da7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3167,9 +3167,9 @@ function RemoteFunctions(config = {}) {
31673167
// its required by the Unsplash API guidelines to track downloads for photographers
31683168
// this is just a tracking call, we don't need to wait for the response
31693169
if (image.download_location) {
3170-
fetch(image.download_location)
3170+
fetch(`https://images.phcode.dev/api/images/download?download_location=${encodeURIComponent(image.download_location)}`)
31713171
.catch(error => {
3172-
//
3172+
console.error('download tracking failed:', error);
31733173
});
31743174
}
31753175

0 commit comments

Comments
 (0)