close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

How to create a unique image file name containing umlauts or accents on upload?

Thread began 6/12/2015 9:04 am by astrostrom | Last modified 6/19/2015 2:14 am by astrostrom | 3635 views | 8 replies

astrostrom

Dear Ray

Thanks again for your reply. Your suggestion:
.
'FileName' => "". session_id() ."",

succeeded in renaming the uploaded image file (also with increments) into the image folder, however I have not been able to get the corresponding image name into the DB.
Obviously I need change something in the bind column but so far all my variations either give me the original file name or write a blank

Insert Record:

$InsertQuery->bindColumn("exhibition_image", "s", "".((isset($_FILES["exhibition_image"]))?$_FILES["exhibition_image"]["name"]:"") ."", "WA_DEFAULT");


File Manipulation:

// WA_UploadResult1_1 Start
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../../exhibitions/",
'FileName' => "". session_id() ."",
'DefaultFileName' => "",
'ResizeType' => "2",
'ResizeWidth' => "205",
'ResizeHeight' => "",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult1", "exhibition_image", "2", "[NewFileName]_[Increment]", "true", $WA_UploadResult1_Params);
}
?>


Upload Form:

<td><input name="exhibition_image" type="file" id="exhibition_image" value=""></td>


I can see the session_id with this code:
<?php echo session_id()?>
which I could put into the form if necessary.

It would be great to accomplish this last step.
Attached is an image file with umlauts,
Thanks for your help.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...