scvinodkumar Posted September 27, 2010 Share Posted September 27, 2010 Hi Friends, I have uploaded a image with the file name (pics%20of-cute-girls.jpg). Its uploaded and displaying in the local system but not in the server. Could you please tell me what should be the reason for this? what setting does i need to change? For your reference i have attached that file [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/214508-image-file-name-with-20/ Share on other sites More sharing options...
squiblo Posted September 27, 2010 Share Posted September 27, 2010 How have you uploaded the file? simply dragged and dropped it into a folder or uploaded it using a form? Link to comment https://forums.phpfreaks.com/topic/214508-image-file-name-with-20/#findComment-1116214 Share on other sites More sharing options...
chintansshah Posted September 27, 2010 Share Posted September 27, 2010 hey, nice pic, very cute %20 because of while uploading a file, there is space "pics of-cute-girls.jpg" in file name So, space is converts to %20 Link to comment https://forums.phpfreaks.com/topic/214508-image-file-name-with-20/#findComment-1116215 Share on other sites More sharing options...
scvinodkumar Posted September 27, 2010 Author Share Posted September 27, 2010 @squiblo i uploaded through form. Please tell me the solution to display image with this type of filename Link to comment https://forums.phpfreaks.com/topic/214508-image-file-name-with-20/#findComment-1116216 Share on other sites More sharing options...
chintansshah Posted September 27, 2010 Share Posted September 27, 2010 before save file on server and insert value in database, just change the file name, Search space and replace with underscore(_) sign. Link to comment https://forums.phpfreaks.com/topic/214508-image-file-name-with-20/#findComment-1116222 Share on other sites More sharing options...
scvinodkumar Posted September 27, 2010 Author Share Posted September 27, 2010 Yeah i can do like that, but its working in local system even with the same file name. Its not only working in the server.... Link to comment https://forums.phpfreaks.com/topic/214508-image-file-name-with-20/#findComment-1116225 Share on other sites More sharing options...
JonnoTheDev Posted September 27, 2010 Share Posted September 27, 2010 You should get into the habbit of renaming files when they are uploaded through a web form. A good option is to use an md5 hash on a filename so it becomes unique. This is done at the point of upload and then the filename can be saved to your database. Yeah i can do like that, but its working in local system even with the same file name. This is irrelevant. Link to comment https://forums.phpfreaks.com/topic/214508-image-file-name-with-20/#findComment-1116228 Share on other sites More sharing options...
scvinodkumar Posted September 27, 2010 Author Share Posted September 27, 2010 OK friends..thanks for your solutions...let me apply... Link to comment https://forums.phpfreaks.com/topic/214508-image-file-name-with-20/#findComment-1116229 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.