# Uploaded files are missing metadata (GenieACS 1.2.0)

**URL:** <https://forum.genieacs.com/t/uploaded-files-are-missing-metadata-genieacs-1-2-0/866>\
**Category:** Uncategorized\
**Created:** [June 29, 2020, 7:42pm UTC](https://forum.genieacs.com/t/uploaded-files-are-missing-metadata-genieacs-1-2-0/866 "2020-06-29T19:42:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![git-neo-si](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/git-neo-si/32/607_2.png) [@git-neo-si](https://forum.genieacs.com/u/git-neo-si)\
**Post date:** [June 29, 2020, 7:42pm UTC](https://forum.genieacs.com/t/uploaded-files-are-missing-metadata-genieacs-1-2-0/866/1 "2020-06-29T19:42:33Z")

</div>

Hello,

after uploading some scripts, configs and firmware files via GUI, I noticed that **all**  **metadata** entered at upload time are missing.

Have I done something wrong? Rechecked directly in Mongo DB, metadata is actually empty.  
Only tried uploading of files via GUI, not via NBI API.

Recheck all uploaded files, all are complete (via Mongo CLI), firmware upgrade initiated via GUI is completed successfully.

NOTE: download of files started working ONLY AFTER disabling use of SSL for FS service in nginx frontend, which is in charge of the SSL part (genieacs services are running in non-SSL mode on localhost of the server). There is another option to re-activate SSL - directly in genieacs-fs service, BUT, maybe, the cause of issues could also be in the CPE devices (not playing nice with HTTPS)… Still need to do some testing in regard to “secure” file downloading. 🙂

Here is the fs.files info directly from mongo:

> db.fs.files.find();  
> { “\_id” : “provision-sample-script.txt”, “length” : 4910, “chunkSize” : 261120, “uploadDate” : ISODate(“2020-06-09T20:52:44.206Z”), “filename” : “provision-sample-script.txt”, “md5” : “33268f98cba7986807cfe9c977ef9fbc”, “metadata” : { “fileType” : “”, “oui” : “”, “productClass” : “”, “version” : “” } }  
> { “\_id” : “config\_file.xml”, “length” : 0, “chunkSize” : 261120, “uploadDate” : ISODate(“2020-06-09T20:54:47.147Z”), “filename” : “config\_file.xml”, “md5” : “d41d8cd98f00b204e9800998ecf8427e”, “metadata” : { “fileType” : “”, “oui” : “”, “productClass” : “”, “version” : “” } }

---

<div class="post-metadata">

**Author:** ![zaidka](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/zaidka/32/9_2.png) [@zaidka](https://forum.genieacs.com/u/zaidka)\
**Post date:** [July 7, 2020, 9:27am UTC](https://forum.genieacs.com/t/uploaded-files-are-missing-metadata-genieacs-1-2-0/866/2 "2020-07-07T09:27:25Z")

</div>

Are you using the latest master branch?

---

<div class="post-metadata">

**Author:** ![git-neo-si](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/git-neo-si/32/607_2.png) [@git-neo-si](https://forum.genieacs.com/u/git-neo-si)\
**Post date:** [July 7, 2020, 10:03am UTC](https://forum.genieacs.com/t/uploaded-files-are-missing-metadata-genieacs-1-2-0/866/3 "2020-07-07T10:03:35Z")

</div>

Yes, github clone, just installed another copy yesterday, same result. Previous install is couple of months old (pulled on 16th of April).

Both ACS nodes are running clean install of Debian Buster. Older install is running with nodejs 12.16.2, mongodb 4.0.18, the newest install is using nodejs 12.18.2, mongodb 4.2.8.

Just uploaded a firmware file, supplied all meta data, but it was not stored into database.

This is stored in db, regarding just uploaded firmware:

> use genieacs;  
> switched to db genieacs  
> db.fs.files.find();  
> { “\_id” : “geneos-lunar-3.13.1-R.img”, “length” : 9959172, “chunkSize” : 261120, “uploadDate” : ISODate(“2020-07-07T09:57:16.993Z”), “filename” : “geneos-lunar-3.13.1-R.img”, “md5” : “0c01d80f0ef7b992f6ffc40bba7e6a97”, “metadata” : { “fileType” : “”, “oui” : “”, “productClass” : “”, “version” : “” } }  
> { “\_id” : “geneos-polar-3.13.1-R.img”, “length” : 7755148, “chunkSize” : 261120, “uploadDate” : ISODate(“2020-07-07T10:25:19.638Z”), “filename” : “geneos-polar-3.13.1-R.img”, “md5” : “b1c71ba52d9e5d524b33122612f9aaeb”, “metadata” : { “fileType” : “”, “oui” : “”, “productClass” : “”, “version” : “” } }

Browser is sending all meta data in the header:  
PUT /api/files/geneos-polar-3.13.1-R.img HTTP/2  
  
Content-Type: application/octet-stream  
metadata.fileType: 1 Firmware Upgrade Image  
metadata.oui: 000F94  
metadata.productClass: Polar  
metadata.version: geneos-polar-3.13.1-R  
Content-Length: 7755148  
Origin: [https://demobox.acs.local:443](https://demobox.acs.local:443)  
Connection: keep-alive  
Cookie: genieacs-ui-jwt=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  
Pragma: no-cache  
Cache-Control: no-cache  
TE: Trailers

How can I check how headers are handled in detail “on the other side”? What debug to enable and look into?

genieacs-ui log file only holds this, and HERE, metadata info is missing:  
2020-07-07T10:05:41.044Z [INFO] [admin@127.0.0.1](mailto:admin@127.0.0.1): Upload files; id=“geneos-polar-3.13.1-R.img” metadata={“fileType”:“”,“oui”:“”,“productClass”:“”,“version”:“”}

---

<div class="post-metadata">

**Author:** ![git-neo-si](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/git-neo-si/32/607_2.png) [@git-neo-si](https://forum.genieacs.com/u/git-neo-si)\
**Post date:** [July 7, 2020, 10:35am UTC](https://forum.genieacs.com/t/uploaded-files-are-missing-metadata-genieacs-1-2-0/866/4 "2020-07-07T10:35:53Z")

</div>

Hi Zaid,

your question got me thinking… and as I am hiding genieacs behind nginx, question popped-up - are headers being passed to backend?

As format “metadata.xxxx:” is a bit “non-standard” (nginx treats them as INVALID), I needed to add “ignore\_invalid\_headers off;” to the “server” part of nginx configuration. Now, headers are passed and also stored.

Tnx for inspiration. 🙂

Regards.
