Hi all,
I have been working on a GUI web photo album for *nix. I had thought it
might be workable for users to
open a browser based FTP session to upload pics to a newly created album
directory. The problem I am having is
opening the FTP session in the new folder. I.E. we have just created
images/myAlbum1. Using realpath(.) we get
/home/someUser/public_html/images/myAlbum1 . Unfortunately the browser
based FTP wants the site root not the server root
and the connection fails.
Is there a reliable way to determine site root from path?
I don't want to regex the path for /www and /public_html, seems like that
would be rash...
Advice?
TIA,
jg 3 14788
"jerrygarci uh" <de*****@no.spa m.nolaflash.com > wrote in message
news:wu_pb.4071 $In3.3247@laker ead01... Hi all,
I have been working on a GUI web photo album for *nix. I had thought it might be workable for users to open a browser based FTP session to upload pics to a newly created album directory. The problem I am having is opening the FTP session in the new folder. I.E. we have just created images/myAlbum1. Using realpath(.) we get /home/someUser/public_html/images/myAlbum1 . Unfortunately the browser based FTP wants the site root not the server root and the connection fails.
Is there a reliable way to determine site root from path?
I don't want to regex the path for /www and /public_html, seems like that would be rash...
Advice?
TIA,
jg
Instaead of using FTP functions, why not just upload it and copy it to the
desired folder?
--
Regards
Richard Grove http://shopbuilder.org - ecommerce systems
Become a Shop Builder re-seller: http://www.affiliatewindow.com/affil...ls.php?mid=611 http://www.affiliatewindow.com/a.pl?590
Here's a thought: use ~someUser
You might need to give some thought as to how ~someUser resolves on FTP
versus http?
On http, as you mentioned, it should be: /home/someUser/
Another thought is just to login to FTP and find the corresponding path
prefix for each users home directory, but it sounds like you may have
already investigated this?
I also seconding the other poster's thought about using PHP uploads - keeps
it in the family.
Cheers,
EE
"jerrygarci uh" <de*****@no.spa m.nolaflash.com > wrote in message
news:wu_pb.4071 $In3.3247@laker ead01... Hi all,
I have been working on a GUI web photo album for *nix. I had thought it might be workable for users to open a browser based FTP session to upload pics to a newly created album directory. The problem I am having is opening the FTP session in the new folder. I.E. we have just created images/myAlbum1. Using realpath(.) we get /home/someUser/public_html/images/myAlbum1 . Unfortunately the browser based FTP wants the site root not the server root and the connection fails.
Is there a reliable way to determine site root from path?
I don't want to regex the path for /www and /public_html, seems like that would be rash...
Advice?
TIA,
jg
I had consider using PHP file uploads and certainly that could be done. My
thought is that I want to enable my users to batch upload
many images at once and I thought if I could either pop an FTP window or
better yet open one in an I-frame this would make less web-savvy types like
the app better.
Thanks for the replies.
Perhaps I need to ask for the FTP username and password in the application
set up and use them to get ftp_pwd() to give me what I need.
jg
"Eric Ellsworth" <s@n> wrote in message
news:AI******** ************@sp eakeasy.net... Here's a thought: use ~someUser
You might need to give some thought as to how ~someUser resolves on FTP versus http? On http, as you mentioned, it should be: /home/someUser/ Another thought is just to login to FTP and find the corresponding path prefix for each users home directory, but it sounds like you may have already investigated this?
I also seconding the other poster's thought about using PHP uploads -
keeps it in the family.
Cheers,
EE
"jerrygarci uh" <de*****@no.spa m.nolaflash.com > wrote in message news:wu_pb.4071 $In3.3247@laker ead01... Hi all,
I have been working on a GUI web photo album for *nix. I had thought it might be workable for users to open a browser based FTP session to upload pics to a newly created album directory. The problem I am having is opening the FTP session in the new folder. I.E. we have just created images/myAlbum1. Using realpath(.) we get /home/someUser/public_html/images/myAlbum1 . Unfortunately the browser based FTP wants the site root not the server root and the connection fails.
Is there a reliable way to determine site root from path?
I don't want to regex the path for /www and /public_html, seems like
that would be rash...
Advice?
TIA,
jg
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: hokiegal99 |
last post by:
How would I determine if a filename is greater than a certain number
of characters and then truncate it to that number? For example a file
named XXXXXXXXX.txt would become XXXXXX
fname = files
if fname > 6
print fname
Thanks!!!
|
by: cooldv |
last post by:
After talking (emailing) to my webhoster, i have placed my access DB
in a folder outside the root directory folder; and they gave me a
*path.asp* file to put in my root directory folder. ** This webhoster
is a real specimen! He/she refuses to provide further support saying
it is a script debugging issue***
I need help from ya'll gurus!!!!!!
1a. The path.asp file has only 1 line code: <% = Server.MapPath(".")
%>
|
by: Win, Pats |
last post by:
I have a snippet of HTML that I inject into a number of pages throughout my
Web site at runtime. My problem is that I'm not getting the image to appear
in all documents into which this snippet is injected.
If I specify a document-relative path (e.g.,
src="../someFolder/AnotherFolder/TheGraphic.gif"), then it works fine, but
only for documents that exist at the level in the directory
structure.
I thought I could use a root-relative...
|
by: John Dalberg |
last post by:
I have an asp.net app that is in a folder which is two levels under the
website root folder. The website has a login.aspx which is in the root
folder.
How do I get the relative path to the web site root folder (not the curent
app folder)? A generic one that works no matter how deep the folder is in
the folder heirarchy
--
|
by: Steve Franks |
last post by:
I am using VS.NET 2005 beta 2. When I run my project locally using the
default ASP.NET Development Web Server it runs using a root address like
this:
http://localhost:11243/testsite/
However when I deploy to a remote test server running real IIS, the real
root of my application becomes:
http://localhost/
What I want to do is have it so that on my local machine the asp.net dev
| |
by: Nalaka |
last post by:
Hi,
I have an asp.net web application (www.myWebSite), and a subweb application
(www.myWebSite/subSite).
How do I set it so that, subweb application (www.myWebSite/subSite) be the
root application.....
so that, when a user types www.myWebSite/subSite, it actualy, shows pages
off subweb.
|
by: Tee |
last post by:
Hi,
Can anyone tell me how to get the path of IIS root folder from coding?
Eg: C:\Inetpub\wwwroot.
I would like to detect it via coding as not everyone set it at the default
folder.
Thanks,
|
by: =?Utf-8?B?R2VvcmdlQXRraW5z?= |
last post by:
Greetings!
I wrote a small Exe that simply runs Shell to load PowerPoint and launch a
particular file, depending on the day of the week. However, it was set up for
office 2003 (I naively hardcoded the path) and I also used Shell. Does
anybody have a snipped showing a more efficient method for launching a
Powerpoint file, regardless of which version of Office is running?
My current, ineffecient code:
Sub main()
Try
|
by: Chris |
last post by:
When I go into debug mode and the web page I am working on opens in the
browser via the local Cassini Web Server I get a path appended onto the full
path e.g.
localhost:7859/FolderName/filename_that_should_be_in_the_root.aspx
this is a pain as I do my links from the root e.g. /css/site.css and the
additional folder in the path stops that. Is there any way to get the site
in debug mode to show
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |