# Get request to chrome sandboxed filesystem returns 403

**URL:** <https://devforum.zoom.us/t/get-request-to-chrome-sandboxed-filesystem-returns-403/97277>\
**Category:** Zoom Apps\
**Created:** [October 24, 2023, 8:19am UTC](https://devforum.zoom.us/t/get-request-to-chrome-sandboxed-filesystem-returns-403/97277 "2023-10-24T08:19:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CSRND](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@CSRND](https://devforum.zoom.us/u/CSRND)\
**Post date:** [October 24, 2023, 8:19am UTC](https://devforum.zoom.us/t/get-request-to-chrome-sandboxed-filesystem-returns-403/97277/1 "2023-10-24T08:19:37Z")

</div>

Hello.

**Description**  
For a logging mechanism log4javascripts creates files in the sandboxed filesystem of chrome. Then we can access it with an xhr request.  
e.g. [https://ourdomain.com/temporary/logs/logfile20231020091215.log](https://ourdomain.com/temporary/logs/logfile20231020091215.log)  
We do not need to download a file however with this request we get the blob and then we can send it to our backend.

**Error?**  
GET filesystem:[https://ourdomain.com/temporary/logs/logfile20231020091215.log](https://ourdomain.com/temporary/logs/logfile20231020091215.log) 403 (Forbidden)

Is this behavior expected? If yes, is there another way to access the file?

Note: When inspecting the app, if you click open in a new tab the log file is displayed.

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [October 24, 2023, 3:56pm UTC](https://devforum.zoom.us/t/get-request-to-chrome-sandboxed-filesystem-returns-403/97277/2 "2023-10-24T15:56:44Z")

</div>

Hi, @CSRND ,

Thank you for posting in the Zoom Developer Forum. To start, can you share more details about your use case and also provide a screenshot of the message you are seeing along with code snippets?

---

<div class="post-metadata">

**Author:** ![CSRND](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@CSRND](https://devforum.zoom.us/u/CSRND)\
**Post date:** [October 26, 2023, 7:39am UTC](https://devforum.zoom.us/t/get-request-to-chrome-sandboxed-filesystem-returns-403/97277/3 "2023-10-26T07:39:23Z")

</div>

Hello @donte.zoom , thank you for your quick response.

The issue is that we store a log file in the temporary storage of the browser and the fetch it with an xhr request.

I do not seem to be able to upload screenshots for some reason but they do not provide much insight.  
Here is a snippet for you to test:

```auto
var requestedBytes = 16,
  _grantedBytes;

function errorHandler(e) {
  console.log(e)
}

function getFile(url) {
              var xhr = new XMLHttpRequest();
              xhr.open('GET', url, true);
              xhr.responseType = 'blob';

              xhr.onreadystatechange = function () {
                if (xhr.readyState !== xhr.DONE) {
                  return;
                }
                
								
                if (xhr.status === 200) {
                  console.log('success')
                } else {
                  console.log('failure')
                }
             }
             xhr.send();
}

function writeFile(fs) {
  console.log(fs)
  fs.root.getFile("file.txt", {
    create: true
  }, function(fileEntry) {
    fileEntry.createWriter(function(fileWriter) {
      fileWriter.onwriteend = function(e) {
        // call `getFile`
        console.log(_grantedBytes);
        console.log(fileEntry);
        console.log(fileEntry.toURL());
		
        getFile(fileEntry.toURL());
      };
      fileWriter.onerror = errorHandler;
      var blob = new Blob(["abc"], {
        type: "text/plain"
      });
      fileWriter.write(blob);
    }, errorHandler);
  }, errorHandler);
}

navigator.webkitTemporaryStorage.requestQuota(requestedBytes
, function(grantedBytes) {
    console.log(grantedBytes);
    _grantedBytes = grantedBytes;
    window.webkitRequestFileSystem(window.TEMPORARY
                                  , grantedBytes
                                  , writeFile
                                  , errorHandler);

}, errorHandler);

```
