Announcement

  •  » Engine
  •  » Adding support for Windows drives (X:\...) in galleries - action vs i

#1 2015-10-22 19:26:28

fernandonajera
Member
2015-10-22
1

Adding support for Windows drives (X:\...) in galleries - action vs i

Hi,

First of all, this is a wonderful software, thanks!

This week I have been hacking it a bit so that it accepts Windows paths in the form of "X:\path".
As it turned out, I had to do really few changes in just 6 files, and it works! I will release the changes in my github soon - I'm sure that I missed places and cases, but it fits my needs.

On the process I discovered that there seems to be two ways of showing images: i.php and action.php (or maybe more?).

As I understand it, i.php basically redirects to the right URL (so it sends the real URL of the picture to the browser), whereas action.php seems to deliver the image itself. For HD images I could no longer relay on sending the the path of the file to the browser (as the file is not inside wwwroot), so I figured out that if I use action.php, it works. It even works for the webservices (for the Piwigo iPhone app).

And here is my question: is there anything against using action.php for *all* image showing? The only downside I immediately see is that it takes more CPU in the server as it would be called for each image. However, for me that's acceptable, and I think it would (or could potentially) provide a huge plus that some people value a lot: it would verify the login status and the rights of the user for each picture, and therefore, you could move the images out of wwwroot and there would not be any direct URL that you could use (or guess) to access the pictures.

Maybe it could be derivative_url_style=3 for paranoid people like me? Ideally I would delete i.php from my installation too.

But I have not studied the source code for too long, and in case I am missing something, I though of asking here first.

I'm using the latest code from default/master.

Thanks,

Fernando

Offline

 

#2 2015-12-23 07:33:33

sridharb
Member
2015-03-07
27

Re: Adding support for Windows drives (X:\...) in galleries - action vs i

Hi,

Just to clarify - with your changes, you are able to now use piwigo on Windows?

If so, please let me know the changes as I have had issues with it working properly before.

Regards,
Sridhar

Offline

 

#3 2016-08-29 07:02:56

MineSeenRaven
Member
2016-08-22
1

Re: Adding support for Windows drives (X:\...) in galleries - action vs i

fernandonajera wrote:

Hi,

First of all, this is a wonderful software, thanks!

This week I have been hacking it a bit so that it accepts Windows paths in the form of "X:\path".
As it turned out, I had to do really few changes in just 6 files, and it works! I will release the changes in my github soon - I'm sure that I missed places and cases, but it fits my needs.

On the process I discovered that there seems to be two ways of showing images: i.php and action.php (or maybe more?).

As I understand it, i.php basically redirects to the right URL (so it sends the real URL of the picture to the browser), whereas action.php seems to deliver the image itself. For HD images I could no longer relay on sending the the path of the file to the browser (as the file is not inside wwwroot), so I figured out that if I use action.php, it works. It even works for the webservices (for the Piwigo iPhone app).

And here is my question: is there anything against using action.php for *all* image showing? The only downside I immediately see is that it takes more CPU in the server as it would be called for each image. However, for me that's acceptable, and I think it would (or could potentially) provide a huge plus that some people value a lot: it would verify the login status and the rights of the user for each picture, and therefore, you could move the images out of wwwroot and there would not be any direct URL that you could use (or guess) to access the pictures.

Maybe it could be derivative_url_style=3 for paranoid people like me? Ideally I would delete i.php from my installation too.

But I have not studied the source code for too long, and in case I am missing something, I though of asking here first.

I'm using the latest code from default/master.

Thanks,

Fernando

I'm not really good in coding yet I tried it. I am using the following code in order to read files from directory and showing them in browser.

Offline

 
  •  » Engine
  •  » Adding support for Windows drives (X:\...) in galleries - action vs i

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact