• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Creating downloadable files within folders .

New Here ,
Dec 07, 2022 Dec 07, 2022

Copy link to clipboard

Copied

Hello All,

A bit of background.

I am an amateur seismologist who has a seismic station which creates triggered event files on a Raspberry Pi.

When an earthquake is detected by the station  approximately 5 files are created and placed in a folder which is time and date stamped automatically. I can then analyse these seismograms locally using the relevent software... 

The mission.

I have a website which I have developed over the years and now I wish to add these folders containing the data files onto my website so other interested parties can select and download and analyse the seismic events. This is the part I need help with.

This is my first post on here and thanks for reading , Hoping someone can educate me , appreciated.

 

Views

199

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 07, 2022 Dec 07, 2022

Copy link to clipboard

Copied

Hi @Cellectronic ,

This is not a Dreamweaver function.  It's a server function.

 

Theoretically, you can add a force download script to the downloads folder on your server. The exact manner will depend on the type of web server and which programming languages it supports.

 

An example using .htaccess file (Linux/Apache server).

https://stackoverflow.com/questions/14388994/forcing-a-download-using-filesmatch-in-htaccess

 

Hope that helps.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

LATEST

I'm not sure I understand your mission, or at least your question:

 

Do you want to automate the upload process each time your station creates files, which would imply that the links to these new files are also generated automatically.

In this case, it would be necessary to add to the script used on the Raspberry (by the way Python or JS?) an FTP sending of the created files to a specific folder on the remote server.

Then on the server side, develop a PHP that would list and make accessible as links all the files present in this specific folder (and/or sub-folder).

 

Or do you want to impose the downloading of the files when the user clicks on the link, and that the browser doesn't try to read them as a page. if this is the case, the discussion on stackoverflow that Nancy proposes is a good idea.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines