LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-26-2022, 09:10 AM   #1
sag2662
Member
 
Registered: Sep 2022
Posts: 69

Rep: Reputation: 0
Upload file to website


Hi all,

I have pdf file generated from a script on debian server, and I would need to upload this file to our website for ex: https://testwebsite.example.com under a specific Tab on website.

Can you please suggest how can we do it in a best way?

Last edited by sag2662; 10-26-2022 at 09:11 AM.
 
Old 10-26-2022, 10:00 AM   #2
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
How have you uploaded anything to that web site?

You give us nothing about the web site server for us to know what to suggest, but the same tools used to create the web site should be usable for uploading more data.
 
Old 10-26-2022, 10:03 AM   #3
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,660

Rep: Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708
Had I complete control of the web server as well as the file source I would :
#1 not use a pdf, rather convert it to well formed html and provide CSS to properly format. PDF is great for downloads, not great for web display.
#2 create the tab and/or link for the new file in the html on the current web server, pointing to the file by name in a secure place within the file structure.
#3 automate and sftp send on file change/update to that location and name.


But that might just be me. Someone else may have an alternate process that would work as well or better.
 
Old 10-26-2022, 10:09 AM   #4
sag2662
Member
 
Registered: Sep 2022
Posts: 69

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by computersavvy View Post
How have you uploaded anything to that web site?

You give us nothing about the web site server for us to know what to suggest, but the same tools used to create the web site should be usable for uploading more data.
I am sorry even i don’t know how the others were uploaded
 
Old 10-26-2022, 12:14 PM   #5
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,141
Blog Entries: 6

Rep: Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828
Code:
pdf_file="/path/to/file.pdf"

curl -F 'file=@'$pdf_file'' https://testwebsite.example.com
About all that can be said, without more info.

Last edited by teckk; 10-26-2022 at 12:16 PM.
 
Old 10-26-2022, 02:28 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,728

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
Is the website hosted?

If so you might be able to upload it via its management service i.e. cpanel or similar or via sftp.

Ask the person who is responsible for your website?
 
Old 10-27-2022, 11:48 AM   #7
sag2662
Member
 
Registered: Sep 2022
Posts: 69

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by teckk View Post
Code:
pdf_file="/path/to/file.pdf"

curl -F 'file=@'$pdf_file'' https://testwebsite.example.com
About all that can be said, without more info.
Thank you.

Last edited by sag2662; 10-27-2022 at 11:52 AM.
 
Old 10-27-2022, 11:50 AM   #8
sag2662
Member
 
Registered: Sep 2022
Posts: 69

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
Is the website hosted?

If so you might be able to upload it via its management service i.e. cpanel or similar or via sftp.

Ask the person who is responsible for your website?
Yes I will. Thanks for suggestions.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP - upload program won't run action "upload.php" script pizzipie Linux - Software 3 08-01-2016 09:51 PM
LXer: Upload Photos On Flickr With Frogr Flickr Upload Client For Linux LXer Syndicated Linux News 0 09-21-2015 11:42 AM
Fedora 6 FTP configuration for website file upload Madone_SL_5.5 Linux - Software 0 10-27-2006 04:54 PM
Proftpd upload to a folder other than 'upload' fooboo Linux - Software 4 04-27-2006 07:51 PM
IglooFTP-PRO refuses to upload files in folder when I upload folder eBopBob Linux - Software 0 08-27-2004 05:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration