Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
PsychProd  
#1 Posted : Sunday, March 27, 2005 8:20:00 AM(UTC)
PsychProd

Rank: Member

Groups: Member
Joined: 5/30/2004(UTC)
Posts: 2

I searched the forum for anything written on this problem and didn't find anything... if it's already been discussed and answered, my apologies.

When I try to upload images (JPEGs) that contain a single quote or apostrophe in the name like "PsychProd's Problem", the file uploads but the name is reduced to everything after the apostrophe. For example "PsychProd's Problem" becomes "s Problem".

I've made sure that my PHP script that's processing the individual uploaded images is properly escaping the file name:

Code:
$save_name = addslashes($_FILES[$source_file][name]);

The upload in progress dialog box correctly prints the name of the photo as it's uploading. But the name already seems to be comprimised when my script gets it.

I believe it to be a problem with IU becuase it didn't happen until I upgraded recently to a newer 3.0 version. I just tried installing the 3.5 upgrade and the problem is still there (to my extreme frustration).

Has anyone else experience this problem... is there an easy fix?

My implimentation looks like:

Code:
<object type="application/x-oleobject" 
	classid="clsid:A18962F6-E6ED-40B1-97C9-1FB36F38BFA8" width="100%" height="500" 
	CodeBase="ImageUploader3.cab#version=3,5,4,0" id="ImageUploader" name="ImageUploader" VIEWASTEXT>

	<param name="Layout" value="TwoPanes">
	<param name="UploadSourceFile" value="True">
	<param name="ProgressDialogTitleText" value="Uploading to TheBarrettsonline.com...">
	<param name="BackgroundColor" value="#FFFFFF">
	<param name="PaneBackgroundColor" value="#F2F2F2">
	<param name="PreviewThumbnailSize" value="120">
	<param name="UploadThumbnail1FitMode" value="fit">
	<param name="UploadThumbnail1Width" value="120">
	<param name="UploadThumbnail1Height" value="120">
	<param name="UploadThumbnail1JpegQuality" value="100">
	<param name="CheckFilesBySelectAllButton" value="True">
	<param name="ButtonSendText" value="Upload Photos...">
	<param name="ButtonStopText" value="Cancel Upload">
	<param name="ShowDeleteButton" value="True">
	<param name="ButtonDeleteFilesText" value="Delete Selected">
	<param name="FileMask" value="*.jpg;*.jpeg;*.jpe;*.JPG;*.JPEG;*.JPE">
	<param name="SignatureFilter" value="Images">
	<param name="ShowDebugWindow" value="True">
	<param name="AdditionalFormName" value="uploadPhotos">
	<param name="EnableRotate" value="False">
	<param name="UploadMode" value="Separate">
	<param name="RedirectUrl" value="photos.php?[truncated]>
	<param name="ShowDebugWindow" value="True">
	<param name="Action" value="upload_activex.php">
</object>

-PsychProd

========================================================

02/14/2008, Fedor

This topic is out of date.

You should use iuembed.js syntax now.

Code:
iu.addParam("FileMask", "*.jpg");

iu.addParam("Layout", "TwoPanes");
iu.addParam("UploadSourceFile", "True");
iu.addParam("ProgressDialogTitleText", "Uploading to TheBarrettsonline.com...");
iu.addParam("BackgroundColor", "#FFFFFF");
iu.addParam("PaneBackgroundColor", "#F2F2F2");
iu.addParam("PreviewThumbnailSize", "120");
iu.addParam("UploadThumbnail1FitMode", "fit");
iu.addParam("UploadThumbnail1Width", "120");
iu.addParam("UploadThumbnail1Height", "120");
iu.addParam("UploadThumbnail1JpegQuality", "100");
iu.addParam("CheckFilesBySelectAllButton", "True");
iu.addParam("ButtonSendText", "Upload Photos...");
iu.addParam("ButtonStopText", "Cancel Upload");
iu.addParam("ShowDeleteButton", "True");
iu.addParam("ButtonDeleteFilesText", "Delete Selected");
iu.addParam("FileMask", "*.jpg;*.jpeg;*.jpe;*.JPG;*.JPEG;*.JPE");
iu.addParam("SignatureFilter", "Images");
iu.addParam("ShowDebugWindow", "True");
iu.addParam("AdditionalFormName", "uploadPhotos");
iu.addParam("EnableRotate", "False");
iu.addParam("UploadMode", "Separate");
iu.addParam("RedirectUrl", "photos.php?[truncated]);
iu.addParam("ShowDebugWindow", "True");
iu.addParam("Action", "upload_activex.php");

========================================================

Edited by user Wednesday, October 29, 2008 2:19:14 PM(UTC)  | Reason: Not specified

portraitmaker  
#2 Posted : Monday, March 28, 2005 3:22:00 AM(UTC)
portraitmaker

Rank: Member

Groups: Member
Joined: 10/30/2003(UTC)
Posts: 12

If you are saving to a database try replacing the single apostrophe ' with two apostrophes '' before it attempts to write to the database. Most databases understand what this means and will save it correctly.

Stephen

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.