- Posts: 31
Before asking for help please read "How to request help" by clicking on that tab above here.
Question problem with the upload of images
- Forscher
- Topic Author
- Offline
- New Member
when I upload an image and I change the name on the server but I forgot the point with the ending (e.g.: ".jpg"). I cant show the file because the browser think it is a octet-stream. In the database also the "m_ext" value is empty but the value for the "2 FORM" in the "m_gedcom" cell is correctly set as "jpeg". Also the upload form identify the correct file format of the chosen image. So I think, the upload code should check the file ending. If the ending is missing the procedure should set the standard value of the found file format.
Cheers
Please Log in or Create an account to join the conversation.
- bertkoor
- Away
- Platinum Member
- Greetings from Utrecht, Holland
There are some clever ways (content sniffing) to analyse what the actual content is, because one should not depend solely on the file extension (.jpg) for that.
To what extend should software go to correct what essentially are "pilot errors"??If the ending is missing the procedure should set the standard value of the found file format.
stamboom.BertKoor.nl runs on webtrees v1.7.13
Please Log in or Create an account to join the conversation.
- Forscher
- Topic Author
- Offline
- New Member
- Posts: 31
But, I think we are talking past each. The local file which is marked in the upload form is correctly saved with an name and the right extension. When I use the option, given by the upload form, "File name on server" and I forgot the extension, the file upload without. Thus, we have two possibility:
Either, the labelling of the option is adjusted ("File name on server" -> "File name and extension on server"), because the name does not include the extension (at least for Windows user).
Or the user-friendly and elegant variant, see my first post.
Cheers
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
If the ending is missing the procedure should set the standard value of the found file format.
If we have a file with no extension, how can we know the correct extension to add? We would need to examine the file contents, and PHP offers very little support for this.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- Jackie
- Offline
- Platinum Member
- Posts: 4787
Forscher wrote: Either, the labelling of the option is adjusted ("File name on server" -> "File name and extension on server"), because the name does not include the extension (at least for Windows user).
Cheers
Hello Forscher,
I am a Windows user and my files have extensions. By default, Windows hides extensions of files. You need to change your settings in the Control Panel.
Go to -> Control Panel -> File Options -> Display tab -> in the list find the choice "Show the file extension" and tick the checkbox -> then, Save !
Please Log in or Create an account to join the conversation.
- Forscher
- Topic Author
- Offline
- New Member
- Posts: 31
Please Log in or Create an account to join the conversation.
- ToyGuy
- Offline
- Moderator
- Live like it's Christmas every day - Santa Stephen
Fix this using your FTP software by adding the JPG or PNG or PDF extension to your file that has no extension. Then you should be able to access it and change the name in webtrees as well.
Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28
Please Log in or Create an account to join the conversation.
- Forscher
- Topic Author
- Offline
- New Member
- Posts: 31
Please Log in or Create an account to join the conversation.