Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
TristanJo
Experienced
Topic Author
Posts: 116
Joined: 10 Apr 2018, 02:57

Upload photos via ftp

21 Oct 2022, 23:12

Hi~ Karl~
I'm sorry I have a lot of questions these days.

When uploading pictures through FTP
I think i need to save it after refreshing it on the panel to see the picture in the gallery.

What I want to do is

If a picture is uploaded through FTP, can't you show the picture automatically when the page refreshes?
If possible, please give me a tip.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Upload photos via ftp

22 Oct 2022, 02:01

This is because of X3's CACHE mechanism. If X3 needs to check if anything was uploaded every time the page loads, it would not be able to use cache and load fast. Cache is managed automatically when you use the X3 panel, as it updates the "mtime" (modified time) of the /content/ dir, so that X3 knows that the page needs to get refreshed.

Couldn't you use the panel? Or even in Files gallery included with X3, which has more a more powerful uploader?
https://demo.photo.gallery/files/ guest / guest

If you need to use FTP (or any other non-X3 upload mechanism), you need to do one of the following after upload, to make sure galleries get refreshed.
  • Click "save" from the panel.
  • Update "modified time" of the /content/ dir. This can be done for example from terminal: "touch content".
  • Update file /config/config/touch.txt (by updating the text, or just updating the date/mtime of the file).
In either case, you need to do one of the above to make sure X3 creates new pages. We can't disable this feature, because then X3 would need to check if new images have been uploaded for every page load, and this would make cache useless.
 
User avatar
TristanJo
Experienced
Topic Author
Posts: 116
Joined: 10 Apr 2018, 02:57

Re: Upload photos via ftp

22 Oct 2022, 12:56

mjau-mjau wrote: This is because of X3's CACHE mechanism. If X3 needs to check if anything was uploaded every time the page loads, it would not be able to use cache and load fast. Cache is managed automatically when you use the X3 panel, as it updates the "mtime" (modified time) of the /content/ dir, so that X3 knows that the page needs to get refreshed.

Couldn't you use the panel? Or even in Files gallery included with X3, which has more a more powerful uploader?
https://demo.photo.gallery/files/ guest / guest

If you need to use FTP (or any other non-X3 upload mechanism), you need to do one of the following after upload, to make sure galleries get refreshed.
  • Click "save" from the panel.
  • Update "modified time" of the /content/ dir. This can be done for example from terminal: "touch content".
  • Update file /config/config/touch.txt (by updating the text, or just updating the date/mtime of the file).
In either case, you need to do one of the above to make sure X3 creates new pages. We can't disable this feature, because then X3 would need to check if new images have been uploaded for every page load, and this would make cache useless.
I want to create a system that automatically uploads at the same time as taking pictures and allows clients to download them immediately.
You can do automatic uploads in real time via FTP without using your computer.
The problem is reloading the cache

Please refer to the image below.

I want your help.
Snipaste_2022-10-23_01-54-09.png
Snipaste_2022-10-23_01-54-09.png (80.09 KiB) Viewed 2188 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Upload photos via ftp

23 Oct 2022, 01:18

TristanJo wrote:You can do automatic uploads in real time via FTP without using your computer.
What do you mean via FTP without using computer? How will they be uploaded? You must have some application for this. It would be very simple to add some code that refreshes the cache, but this code will need to get triggered somehow.
 
User avatar
TristanJo
Experienced
Topic Author
Posts: 116
Joined: 10 Apr 2018, 02:57

Re: Upload photos via ftp

24 Oct 2022, 04:24

mjau-mjau wrote:
TristanJo wrote: 컴퓨터를 사용하지 않고도 FTP를 통해 실시간으로 자동 업로드를 수행할 수 있습니다.
컴퓨터를 사용하지 않고 FTP를 통해 무엇을 의미합니까? 어떻게 업로드되나요? 당신은 이것에 대한 몇 가지 응용 프로그램이 있어야합니다. 캐시를 새로 고치는 코드를 추가하는 것은 매우 간단하지만 이 코드는 어떻게든 트리거되어야 합니다.
Hi~ karl~

Until this part (image), automation is possible on the camera without a computer.

I'd like to have an idea for the part about cache triggering outdoors without a computer.
plz~
Snipaste_2022-10-24_17-22-34.png
Snipaste_2022-10-24_17-22-34.png (38.04 KiB) Viewed 2179 times
 
User avatar
TristanJo
Experienced
Topic Author
Posts: 116
Joined: 10 Apr 2018, 02:57

Re: Upload photos via ftp

24 Oct 2022, 04:34

TristanJo wrote:
mjau-mjau wrote:
TristanJo wrote: 컴퓨터를 사용하지 않고도 FTP를 통해 실시간으로 자동 업로드를 수행할 수 있습니다.
컴퓨터를 사용하지 않고 FTP를 통해 무엇을 의미합니까? 어떻게 업로드되나요? 당신은 이것에 대한 몇 가지 응용 프로그램이 있어야합니다. 캐시를 새로 고치는 코드를 추가하는 것은 매우 간단하지만 이 코드는 어떻게든 트리거되어야 합니다.
Hi~ karl~

Until this part (image), automation is possible on the camera without a computer.

I'd like to have an idea for the part about cache triggering outdoors without a computer.
plz~

Snipaste_2022-10-24_17-22-34.png
I want to sell x3 website(your hosting) and wireless transmission system as a package to photographers.

(Is there a language file needed to translate x3 panel into Korean?)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Upload photos via ftp

24 Oct 2022, 23:58

TristanJo wrote:I'd like to have an idea for the part about cache triggering outdoors without a computer.
I'm trying to think of a solution, but it's a bit limited. You need some kind of script that does "touch content" (the X3 /content/ dir) after any updates.

The only thing I can think of, is creating a local script on the server, that runs every 1-2 minutes. The script checks if any CHANGES were made (compared to last time it checked). If changes were made (uploads), it would "touch content" and X3 cache would get refreshed.

I simply can't see any way to do this with camera FTP upload, without disabling cache, but that's not useful.
TristanJo wrote:(Is there a language file needed to translate x3 panel into Korean?)
The X3 panel is only partially translated. You can duplicate panel/filemanager_assets/lng/English.php into Korean.php and translate it.

In the future, we will replace X3 panel with our new files.gallery (see demo), which is already translated into Korean. Files is already included in X3 (in /files/ sub-directory), but it can't yet manage X3 settings.