About send a picture on posting an event - php

I would like to upload a picture to Facebook event.
I don't understand the means of "#" in this answer. Can't I specify picture URL on the Internet directly?

Actually you cant upload a image from the root folder or the specified folder of server where you have your code. You cant link a picture path to this code.
"#" -> which is facebook standard to point the realpath of a picture you gonna upload.

Related

Show an uploaded image using codeigniter

I have successfully uploaded an image in folder application/uploads codeigniter. When I'm trying to display the image in an <img> tag its not showing. I've checked the path is correct and the image does exist.
Just hit that image src link on browser and check whether image is displaying or not. You can upload your images in assets folder. Call your image by using url https://yoururl.com/assets/imgfolder/img.jpg . It should display. Hope this will help you.
Can you show us the tag you are using with the path. If you believe the path is correct, can you type this path straight into your browser and see the image displayed? You can do a 'view source' to get the path if you are using Codeigniter base_url or similar.
(sorry to post this as an answer but my rep isn't high enough to allow commenting)

Dropbox get public url of the file after upload

Need to upload files to dropbox and get the public url of that file. I'am generating thumbnails and need to show that in my site. I should also show the original files to users without login to the dropbox site.
After uploading to dropbox I need to get the original file url which will be used by crocodoc api viewer.
I could able to upload the file and I am getting the metadata of that file. I created shared url and given that url that url img tag in html but seems returning as html instead of image.
I have gone through similar questions mentioned in SO but almost all are referring old documents.
I found this trick earlier and thought I'd share.
Go to: https://www.dropbox.com/home
Then, highlight your mouse over an item, click on share.
This will popup:
Simply change:
https://www.dropbox.com/s/io9oz94lgm2j2bb/loadingscreen.jpg?dl=0
to
https://dl.dropbox.com/s/io9oz94lgm2j2bb/loadingscreen.jpg
Replacing the www with dl, to get the direct, public url.

Image download from server URL android

For now, i am able to download the image that i uploaded into my server. My upload is using php script to file open a image to store the .jpg file in the server. But i want to know how to retrieve the new image from my server to my android application. What i meant is every time the user upload the image, the image will replaced the old image file (using the same file name) in my server folder.
When i reload the image in my application, it still gives me the old image even though the image not longer exist. Later i found out that i need to go the url and refresh the image then the new image will be loaded in the android application. I want to know how can i refresh the url without using the browser to refresh the image every time the user upload new image. Thanks!
My question might not be clear/good but i really needed help and im new to android development
A pragmatic approach: When the user uploads a file, also make a txt/xml-file with the current date in it.
Make you Android application poll the txt/xml-file. Store the date in the txt/xml-file (in a database). When polling verify if the date in the file is newer then the one you stored. If it's newer, download your image.
After successfully replaced on server,you have to get url of new uploaded image as response & replace old url by new url.

TimThumb use with pictures from non public folder or virtual folder

I am using the TimThumb script (http://code.google.com/p/timthumb/). My images links are generated like this: http://website.com/pics/nature/animals/bear.png and this works great but I can't seem to use TimThumb like this: http://website.com/resize.php?src=http://website.com/pics/nature/animals/bear.png&h=150&w=150, it says Could not find the internal image you specified. I believe this is because my images are brought from a folder by slug names (bear.png). The folder's images are named by the ID of the image so there is no bear.png on the server, my application is using slugs to search the DB and bring up the real name of the picture but it loads the image upon this link: http://website.com/pics/nature/animals/bear.png. If I give my resize.php script a link from flickr it works great.
BTW, resize.php is the actual TimThumb script.
Any ideas ? Thanks !
Dont use a local path, enter the full URL for timthumb just like you did with flickr

ckeditor, php, image display issue

I have a download.php file to display images on a web page as well as downloading files like pdfs, docs, etc.
in ckeditor if the src for the image is /download.php it dispalys like there is no image or broken link image, if the src for the image is http://www.mydomain.com/download.php my image displays just fine in ckeditor.
Any thoughts? And no i cant just make it put the full domain. There is a reason to long, complicated, and stupid to explain thanks to the web hosting company.
In the configuration you need to set the baseHref to the full path, then it will add that to the images/files you upload and insert.

Categories