Custom File Station Download Page

Tell us your most wanted features from QNAP products.
User avatar
OneCD
Experience counts
Posts: 3235
Joined: Sun Aug 21, 2016 10:48 am
Location: over there, behind that sofa...

Re: Custom File Station Download Page

Postby OneCD » Tue Mar 07, 2017 10:27 am

ogio855 wrote:Makes sense, but this assumes that when I replace the logo files in the locations listed that it should work if the NAS isn't restarted. When the files were replaced, the QNAP logo still populates the sharelink, even if I create a new one that didn't exist before.

You may also have to restart the httpd service, and don't forget to clear your browser's cache! ;)

I've switched to pure Debian on my production NAS (TS-569 Pro), with the backup NAS (TS-559 Pro+) to follow, so I'll no longer be able to use or support QNAP's firmware. This means no more closed-source software, "Malware Removers", etc ... If you have the means, I highly recommend it. Powerup/poweroff times are < 1 minute. :D

one.cd.only@gmail.com

ogio855
New here
Posts: 7
Joined: Thu Nov 27, 2014 2:06 am

Re: Custom File Station Download Page

Postby ogio855 » Wed Mar 08, 2017 2:44 pm

Finally got it sorted, for anyone in the future looking to get a custom sharelink page for clients, or friends...
The file in question is a slice file - slice-s352abf1c96.png it is located in two locations;
/home/httpd/cgi-bin/filemanager/shareLink/images/slice-s352abf1c96.png
/home/httpd/shareLink/images/slice-s352abf1c96.png

you can edit this file but you are limited to the height of the original QNAP logo at the top, if you need to make it wider you can widen the canvas and make sure everything is still positioned on the far left hand side. Save this file and place it back into the above two locations.
If you didn't alter the width, everything should work as-is.

To make it work with a wider logo, under the following directories there is a css file that needs to be edited.
httpd/cgi-bin/filemanager/shareLink/css/app.css
httpd/shareLink/css/app.css

Search the script for "95px" it is under the background-position prefix for the slice-QNAP section.
slice-QNAP{background-position:0 -16px;height:18px;width:95px;}
Change the 95 to whatever the canvas width needs to be to fit your logo. This will change the length of the wrapper in the header.

http://www.calgarysbestoil.com/images/screenshot.jpg - IMG tag wouldn't work for some reason.

Once the NAS is restarted everything will revert, if you install the Autorun script that OneCD referenced earlier then you should be able to make a script to copy the files on startup, still working on that bit myself.

PS... I believe it only needs the httpd/shareLink location for both, but I did all the locations listed above anyhow. - This is confirmed, if you just change the httpd/shareLink locations it will automatically correct the cgi-bin files as well, at lease it is doing so on my system.

I am running the following autorun script at startup to successfully copy the files over during reboot;
#!/bin/sh
rm /home/httpd/shareLink/images/*.png
rm /home/httpd/shareLink/css/*.css
cp /share/Public/logo/slice-s352abf1c96.png /home/httpd/shareLink/images/
cp /share/Public/logo/app.css /home/httpd/shareLink/css/

I'm not sure why, but if I didn't run a remove command they files weren't copying all the time. Sometimes it would just leave the original file in the location.

vladblindu
New here
Posts: 5
Joined: Thu Jan 14, 2016 6:03 am

Re: Custom File Station Download Page

Postby vladblindu » Thu Apr 13, 2017 6:39 pm

For unknown reasons I never got notified about further comments on this post. As OneCd points out, this is exactly the hack I've done. BUT, WHY THE HECK DO WE HAVE TO HACK SOMETHING I PAY FOR. My website and my clients email is no place for doing free advertising for QNAP. Does anybody there care ????

dolbyman
Ask me anything
Posts: 6545
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Custom File Station Download Page

Postby dolbyman » Thu Apr 13, 2017 10:48 pm

at the end of the day it's just a little addon made for customer convenience by qnap..if you want a better/different method you can always install a 3rd party package

vladblindu
New here
Posts: 5
Joined: Thu Jan 14, 2016 6:03 am

Re: Custom File Station Download Page

Postby vladblindu » Mon Jun 19, 2017 11:11 pm

What package would you recommend?

dolbyman
Ask me anything
Posts: 6545
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Custom File Station Download Page

Postby dolbyman » Mon Jun 19, 2017 11:52 pm

no idea if those are good .. but here is a list

https://scriptnull.net/scripts/top-10-b ... ng-script/

vladblindu
New here
Posts: 5
Joined: Thu Jan 14, 2016 6:03 am

Re: Custom File Station Download Page

Postby vladblindu » Fri Sep 22, 2017 1:55 am

I didn't have the time lately to research this scripts but yesterday I did.
Right now, by right clicking on a file and get a sharing menu. This is great indeed. Loosing this short and fast way of sharing by using other scripts as you suggested would be a huge loss of time.
I think it should be a much more elegant way of solving this issue, pending for so long on this forum, by having someone from QNAP technical team to do one of the following:

2. Modify the script so it loads a external, editable html template (I'm ready to work on this matter if needed)
3. Share the share-cgi code (I really don't think this file contains such a treasure in proprietary code not to be disclosed)
3. Or, at least, expose the DB(I suppose) table where the shared file's ssid's are stored so one could generate a different url.

I manage an advertising post-production studio and I share preview files with my clients. They are very sensible to logos and branding. I am willing to spend time and effort (I graduated in computer science a long time ago, but still have some coding skills) to solve this problem. I understand that: "is just a little addon made for customer convenience by qnap", so please it's definitely "customer convenience" I'm talking here about.
Thank you


Return to “Features Wanted”

Who is online

Users browsing this forum: No registered users and 4 guests