How to edit FTP URLs to HTTP to make images display? - image

I need to upload images into a page in my website.
I usually use WinSCP FTP program because it gives me the option "Copy to Clipboard (Include paths)". I copy images' URL through this option and the images are usually uploading and displaying successfully to the website.
I'm trying to do the same now for a new page but that is not working. Using any option in WinSCP is not helping at all. All I get is a small icon instead of the image. But when I use FileZilla for copying the URL, the images are uploading and displaying successfully. BUT the problem is that the page is requesting the username and the password to display the images.
I've been googling about it and I realise that the problem could be that I need to change the FTP URL to HTTP. I tried to do it this way:
ftp://username#domain.org/domain_restore/pics/anton.jpg
to:
http://username.domain.org/anton.jpg
That is probably totally wrong? I tried some other ways but the problem is I'm only a beginner and I don't have the knowledge how to edit it or how to find out what the problem is.
I followed the instructions of someone from the support of my host and they advised me to do a restore to all my directories in the FTP manager. I did that but I feel like I messed it up because now all the folders and the directories are duplicated. Could that also be the problem?

Related

images not appearing online but appears offline. I am uploading via Filezilla

I am uploading my website using Filezilla, and some images are not appearing. I have checked that the file names are all lower case and that the file type is set to auto instead of ASCII. I have cleared the cache too and I am still not seeing the same images not appearing.
I have got a 403 and 404 error on these images in the console, please see screenshot image for this.error image
All images work fine when testing locally on my computer but some random images are not appearing. Anyone any ideas why this could be?
Thanks!
image not appearing
Could you maybe provide some code with examples?
It could e.g be that the path on the server is different. If you use absolute paths it may work on your host where the homepage is under /. But if it is under /user/ or something similar (so not in the root), the paths can be broken and images will not appear. So check if you provide the paths differently for the pictures that work as opposed to the ones which fail.

magento file upload not working

I have this odd situation. When creating (or updating) a product in the images section whenever I select a file (or multiple files) the list the selected files doesn't appear therefore I can't upload any images to a product. I don't have ANY errors in the console or in the log and the most odd is that when running the code on a localhost it works. All the required folders on the server exists and they are writable. Any ideas on what could be the reason?
Please check Flash browser plugin working. It's should be installed and enabled.
ok, guys, I found the problem. It easy at it seems took me a lot of time to realize that it's only working when accessing the website with www

drupal node‘s image field do not dispaly the image

The problem was appeared when I migrate my site from WindowsServer2003 to CentOS.
There is a image field in the Node type.In the old server everything goes well,but in the CentOS the nodes' image field do not show the picture. It just show the image name as a link and click the image name I can see the picture in a new browser tab.
I know that the images have been upload in the sites/default/files. And also the permission for the directory is 777.
I google a lot but get no results.
so what cause the problem? any suggestions are appreciated.
Windows and Unix-based systems use different pathing syntax, so the paths for your images may not work now, under CentOS. Use a text editor's find-and-replace feature to change the paths in the database by exporting the database to a SQL file, running the find-and-replace, and then importing the file. Make sure to keep backups of everything.

opens archive insted of downloading it

i have a simple question, but i couldn't find an easy solution for it, i have a rented ftp, i cant moderate it, and i have a website with links to this ftp, there few archive files that i want them to be downloaded rather than opened directly through browser, my link looks like this:
IMS 200 Client V1.29 (06.02.13)
i solved this problem by using php page that defines the file type, so that browser could understand that it is archive, and then download it, rather than try and open it directly through browser, is there any easier way to achieve it?!
thank u all for the help!
Hope that my case can help you some way.
I have a website that allows user to view news and download files. Oneday, I discover that if I show up the download link to a .rar file directly, eg. http://www.somenet.com/myfile.rar, then it is opened automatically in the browser instead of asking users if they want to save/open it. If I write some code to read and transfer the file to browser, eg. http://www.somenet.com/download?fileid=123, then it is asked to be saved/opened by browser.
After googling a while, I insert a piece of configuration into my Apache Tomcat web.xml (often at CATALINA_HOME/conf/web.xml) as follows:
<mime-mapping>
<extension>rar</extension>
<mime-type>application/x-rar-compressed</mime-type>
</mime-mapping>
then restart the Apapche Tomcat server to take effect.
And now i can click on the direft rar link to download the file.
I also have to restart the IE (FF takes effect right away).
Good luck!
If you can use HTML5 you can try to use:
Download this file
Extracted from: HTML5 link download

Swapping an image during web development

I'm trying to see what a certain webpage would look like if I replaced a certain image with another. Rather than upload the image, edit the site, etc, each time I tweak it, I'd like to know if there's a way to change the image in the page to my local version while viewing the remote page.
I use Firebug for debugging web development usually, but I'm open to any other tool that might do this.
(It is absolutely impossible to search for this and find anything but questions about dynamic image swapping on a deployed website, so sorry if this is a duplicate.)
Added: I just tried substituting a file:/// URI pointing to the image (copied and pasted from the address bar after manually opening the image), and alas, it did not work — the image fails to change.
It seems to only work with the http[s] protocols (likely for security reasons). You can store your images on service like Dropbox, share the image or folder, then use the public URLs.
Really, you can use any web accessible images, so a local server would work too.
If your image is in a localhost server(not as file mind you) i think you can still put that localhost url in the firebug inspect element and it'll work.
Tried an absolute file path but it doesn't work apparently. So I guess you just have to make do with a localhost server image. That works for me
Quick and Lowtech Answer: Take a screen shot of the page open it in photoshop and drop the local image on a layer above the webpage image.
Hi if you are serving from a webserver, u probably can't point it to a file on ur local drive. Even if its localhost, u can't point to a local file c:/test.jpg for example. Its because the browser sorts of sandbox ur page so that scripts can't access local files.
One way is to upload the new file (new_file.jpg) to the webserver, give the image link an id
<img id="something1" src="test.jpg"/>
Using jQuery in the firebug watch window do
$("#something1").attr("src","new_file.jpg");
You should see the image change. If you are not using jQuery, you can use document.getElementById("something1") and get the element to modify.
Another way is to use http://makiapp.com/
You can overlay an image from you computer onto any website you look at with this. Very cool tool for lining up a comp with your code.
You can:
Drag your test image into Google Drive
Open it in a browser
Go to the actual image path
Use this path as a substitute in Firebug
It's almost as fast as working from a local drive.

Resources