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.

TOPIC: problem with the upload of images

problem with the upload of images 4 years 9 months ago #1

  • Forscher
  • Forscher's Avatar
  • Offline
  • New
  • Posts: 18
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: 4 years 9 months ago by Forscher.
The administrator has disabled public write access.

problem with the upload of images 4 years 9 months ago #2

  • bertkoor
  • bertkoor's Avatar
  • Offline
  • Gold
  • Greetings from Utrecht, Holland
  • Posts: 1602
"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.9
Last Edit: 4 years 9 months ago by bertkoor.
The administrator has disabled public write access.

problem with the upload of images 4 years 9 months ago #3

  • Forscher
  • Forscher's Avatar
  • Offline
  • New
  • Posts: 18
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
The administrator has disabled public write access.

problem with the upload of images 4 years 9 months ago #4

  • fisharebest
  • fisharebest's Avatar
  • Online
  • Administrator
  • Posts: 11149
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 - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

problem with the upload of images 4 years 9 months ago #5

  • Jackie
  • Jackie's Avatar
  • Offline
  • Platinum
  • Posts: 4709
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 !

Last Edit: 4 years 9 months ago by Jackie.
The administrator has disabled public write access.

problem with the upload of images 4 years 9 months ago #6

  • Forscher
  • Forscher's Avatar
  • Offline
  • New
  • Posts: 18
Ok, my english is bad, so now the images:


The administrator has disabled public write access.

problem with the upload of images 4 years 9 months ago #7

  • ToyGuy
  • ToyGuy's Avatar
  • Offline
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
  • Posts: 4925
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
The administrator has disabled public write access.

problem with the upload of images 4 years 9 months ago #8

  • Forscher
  • Forscher's Avatar
  • Offline
  • New
  • Posts: 18
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: 4 years 9 months ago by Forscher.
The administrator has disabled public write access.
Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 
Powered by Kunena Forum