# HTML5 file upload issues

**URL:** <https://community.learningequality.org/t/html5-file-upload-issues/2034>\
**Category:** Studio\
**Created:** [June 2, 2021, 2:09pm UTC](https://community.learningequality.org/t/html5-file-upload-issues/2034 "2021-06-02T14:09:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![k2edutech](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@k2edutech](https://community.learningequality.org/u/k2edutech)\
**Post date:** [June 2, 2021, 2:09pm UTC](https://community.learningequality.org/t/html5-file-upload-issues/2034/1 "2021-06-02T14:09:36Z")

</div>

Operating System (e.g. Windows, MacOS, Linux):Windows

Browser (e.g. Chrome, Firefox, Safari): Chrome

Channel (Name of the channel you were working on):Physics 9

Description of problem: When I upload new html5 files, the old files show up in Kolibri Studio. For example, I uploaded file ‘introduction-to-physics-ver-1’, but the file I see in the studio is ‘introduction-to-physics-rev-5’, which is an older revision/version. The issue is not consistent, I have loaded 5 file, the 3 files are ok with the right version, but the two are the older incorrect files.

---

<div class="post-metadata">

**Author:** ![richard](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/richard/32/10_2.png) [@richard](https://community.learningequality.org/u/richard)\
**Post date:** [June 2, 2021, 2:59pm UTC](https://community.learningequality.org/t/html5-file-upload-issues/2034/2 "2021-06-02T14:59:19Z")

</div>

Hi @k2edutech,

Thanks for reporting this - when you have issues, do you see any errors in the developer console in your browser? This can usually be opened by pressing F12 or going to the menu and selecting Developer Tools → Console or something similar.

If you see any errors there, that might give us more of a lead.

If you would like to share the URL of the channel on Studio with me, I’d be happy to take a look at it, but would not want to be uploading files to your channel, ofc!

Kind Regards,  
Richard

---

<div class="post-metadata">

**Author:** ![k2edutech](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@k2edutech](https://community.learningequality.org/u/k2edutech)\
**Post date:** [June 2, 2021, 4:43pm UTC](https://community.learningequality.org/t/html5-file-upload-issues/2034/3 "2021-06-02T16:43:16Z")

</div>

Here is the URL for Physics 9 channel in Kolibri Studio. Please go to Chapter 1, Introduction to Physics. In the preview, it has file ‘introduction-to-physics-rev-5’. It should have been ‘introduction-to-physics-ver-1’ as included in the Sushichef script:

[https://studio.learningequality.org/en/channels/0dd1b20d2fe356bc92ef177d06895c4c/#/221befc27ddc47e0816a60c1fb3e6eb6](https://studio.learningequality.org/en/channels/0dd1b20d2fe356bc92ef177d06895c4c/#/221befc27ddc47e0816a60c1fb3e6eb6)

Regards,  
Iqbal Chaudhry

---

<div class="post-metadata">

**Author:** ![k2edutech](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@k2edutech](https://community.learningequality.org/u/k2edutech)\
**Post date:** [June 2, 2021, 4:54pm UTC](https://community.learningequality.org/t/html5-file-upload-issues/2034/4 "2021-06-02T16:54:25Z")

</div>

And I do see the following errors:  
 ![image.png](https://canada1.discourse-cdn.com/flex035/uploads/learneq/original/1X/527ae8e161d6bf63ccc536d7ae560e44d7b56bc1.png)

---

<div class="post-metadata">

**Author:** ![richard](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/richard/32/10_2.png) [@richard](https://community.learningequality.org/u/richard)\
**Post date:** [June 4, 2021, 5:25pm UTC](https://community.learningequality.org/t/html5-file-upload-issues/2034/5 "2021-06-04T17:25:18Z")

</div>

Also, this channel seems no longer to exist when I try to navigate to it.

The errors you are seeing in the console there seem to be a result of a CSP we are not including ourselves, are you running any addons that would be doing the blocking? Either way, not running these scripts wouldn’t break core functionality.

> Sushichef script

Was this upload via the interface or via ricecooker? If the latter, then we’d need to see your sushi chef script to understand what might be happening here.

---

<div class="post-metadata">

**Author:** ![k2edutech](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@k2edutech](https://community.learningequality.org/u/k2edutech)\
**Post date:** [June 4, 2021, 9:48pm UTC](https://community.learningequality.org/t/html5-file-upload-issues/2034/6 "2021-06-04T21:48:09Z")

</div>

Hi Richard,  
I’m using VSCode and Sushichef script to upload HTML5 files to Kolibri Studio. The html5 files are in a folder html5 in the path shown below.  
The issue was that the script was uploading a different/older version of file (i.e. “introduction-to-physics-rev-5”) instead of what was the in the current script (i.e. “introduction-to-physics-ver-1”). The “introduction-to-physics-rev-5” was not even present in html5 folder. It seems that the Studio was picking up this file from its server.

When I changed the path in the following lines by just removing the ‘html5’ folder

# Create html5 files

htmlzip\_file1 = HTMLZipFile(path=“C:/Users/micha/KolibriStudioUpload/html5/introduction-to-physics-ver-1.zip”)  
html1 = HTML5AppNode(title=“Introduction to Physics”, source\_id=“html5-1”, files=[htmlzip\_file1], license=get\_license(licenses.PUBLIC\_DOMAIN))

to

# Create html5 files

htmlzip\_file1 = HTMLZipFile(path=“C:/Users/micha/KolibriStudioUpload/introduction-to-physics-ver-1.zip”)  
html1 = HTML5AppNode(title=“Introduction to Physics”, source\_id=“html5-1”, files=[htmlzip\_file1], license=get\_license(licenses.PUBLIC\_DOMAIN))

The uploaded files were correct. (Note: I placed a copy of file “introduction-to-physics-ver-1” into ‘KolibriStudioUpload’ folder, so that the script can find the file).

Although, my current issue is resolved, but I have two questions that would help me in the future.

1. How just by changing the folder would solve this issue?
2. I understand that Kolibri Studio keeps the older files on the server. How can we purge those file so that the Studio does not pick up the older unwanted files?

Regards,  
Iqbal Chaudhry  
[K2EduTech.org](http://K2EduTech.org)

---

<div class="post-metadata">

**Author:** ![richard](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/richard/32/10_2.png) [@richard](https://community.learningequality.org/u/richard)\
**Post date:** [June 10, 2021, 3:54pm UTC](https://community.learningequality.org/t/html5-file-upload-issues/2034/7 "2021-06-10T15:54:10Z")

</div>

It seems like this might be an issue with file caching within ricecooker. Could I ask you to fill out an issue on the ricecooker repository describing this? [https://github.com/learningequality/ricecooker/issues/new](https://github.com/learningequality/ricecooker/issues/new)

Alternatively, if you can tell me these three things:

```auto
* ricecooker version:
* Python version:
* Operating System:

```

I can fill out the issue using your description above.

Kind Regards,  
Richard

---

<div class="post-metadata">

**Author:** ![k2edutech](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@k2edutech](https://community.learningequality.org/u/k2edutech)\
**Post date:** [June 14, 2021, 2:45pm UTC](https://community.learningequality.org/t/html5-file-upload-issues/2034/8 "2021-06-14T14:45:02Z")

</div>

Hi Richard,  
The issue has occurred again. Here is the URL of the channel:  
[https://studio.learningequality.org/en/channels/0dd1b20d2fe356bc92ef177d06895c4c/#/26e0750a1f30434bb16e96c77cc3e371/8d07db2b494e4003b09dded038e3e2dd](https://studio.learningequality.org/en/channels/0dd1b20d2fe356bc92ef177d06895c4c/#/26e0750a1f30434bb16e96c77cc3e371/8d07db2b494e4003b09dded038e3e2dd)

This time I’m uploading ‘introduction-to-physics-ver-2’, but the studio still shows the older version of the file ‘introduction-to-physics-ver-1’.  
And the developer console shows the following errors. I’m using:  
Ricecooker version: v0.6.43  
Python version: 3.7.9 (64 bit)  
Operating system: Windows 10 Home

Regards,  
Iqbal Chaudhry

 ![image.png](https://canada1.discourse-cdn.com/flex035/uploads/learneq/original/1X/b1d1597bdc02444f52379a4f9b2792268633d0ce.png)

---

<div class="post-metadata">

**Author:** ![richard](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/richard/32/10_2.png) [@richard](https://community.learningequality.org/u/richard)\
**Post date:** [June 14, 2021, 3:20pm UTC](https://community.learningequality.org/t/html5-file-upload-issues/2034/9 "2021-06-14T15:20:34Z")

</div>

During the run of the script is there any indication that this file has not been uploaded? How many files does the script say it has uploaded when you upload with just the new version?

---

<div class="post-metadata">

**Author:** ![k2edutech](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@k2edutech](https://community.learningequality.org/u/k2edutech)\
**Post date:** [June 16, 2021, 9:34pm UTC](https://community.learningequality.org/t/html5-file-upload-issues/2034/10 "2021-06-16T21:34:47Z")

</div>

The script indicates that all 4 files are downloaded. The issue is with the first file shown below, as the system does not load the new version (ver-2)

![image.png](https://canada1.discourse-cdn.com/flex035/uploads/learneq/original/1X/0c7d5b96b96af45d0aeb7887d056e7731efe7a3e.png)
