Web based family history software

This Help forum is for issues relates to the latest release (1.5.x). For issues related to beta or github version please use their own Help forum.
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
  • New Member
More
9 years 5 months ago - 9 years 5 months ago #1 by Forscher
problem with the upload of images was created by Forscher
Hello,

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
Last edit: 9 years 5 months ago by Forscher.

Please Log in or Create an account to join the conversation.

  • bertkoor
  • Away
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
More
9 years 5 months ago - 9 years 5 months ago #2 by bertkoor
Replied by bertkoor on topic problem with the upload of images
"Octet-stream" is the standard MIME type of binary files of unknown type. This tells the browser the file consists of a stream of just bits in groups of 8 (those are bytes).

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.

If the ending is missing the procedure should set the standard value of the found file format.

To what extend should software go to correct what essentially are "pilot errors"??

stamboom.BertKoor.nl runs on webtrees v1.7.13
Last edit: 9 years 5 months ago by bertkoor.

Please Log in or Create an account to join the conversation.

  • Forscher
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 5 months ago #3 by Forscher
Replied by Forscher on topic problem with the upload of images
Add the file name extensions is standard in many software solutions.

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.

More
9 years 5 months ago #4 by fisharebest
Replied by fisharebest on topic problem with the upload of images

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.

More
9 years 5 months ago - 9 years 5 months ago #5 by Jackie
Replied by Jackie on topic problem with the upload of images

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 !

Attachments:
Last edit: 9 years 5 months ago by Jackie.

Please Log in or Create an account to join the conversation.

  • Forscher
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 5 months ago #6 by Forscher
Replied by Forscher on topic problem with the upload of images
Ok, my english is bad, so now the images:


Attachments:

Please Log in or Create an account to join the conversation.

  • ToyGuy
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
More
9 years 5 months ago #7 by ToyGuy
Replied by ToyGuy on topic problem with the upload of images
This is your mistake in interpretation. The FILE NAME should always include the file extension. It is an important part of the entire file name. Of course, very, very few people change the file name when they upload. Usually, you have the file name you wish to use already recorded on your local machine. Not sure why you would find it necessary to modify the name often, but maybe this was a one-off situation.

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
  • New Member
More
9 years 5 months ago - 9 years 5 months ago #8 by Forscher
Replied by Forscher on topic problem with the upload of images
I know, how I can fix it. But where is the problem to check if there is a point in the new name? Nobody will change the extension, the labeling is misleading.
Last edit: 9 years 5 months ago by Forscher.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}