close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Upload Files Bindings

Thread began 12/27/2012 3:55 pm by cal114936 | Last modified 12/27/2012 4:43 pm by Ray Borduin | 385 views | 1 replies |

cal114936Beta Tester

Upload Files Bindings

Is there documentation for the values returned through the bindings panel for example:

<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["clientFileName"]; ?>
<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"]; ?>
<?php echo ($WA_DFP_UploadStatus["WA_UploadResult1"]["serverSimpleFileName"]); ?>

I am uploading photos and creating multiple sizes and naming the files according to size.

Example:

Original uploaded filename is 1823635.jpg

Uploaded and renamed versions:
1823635_photo1_150px.jpg
1823635_photo1_300px.jpg
1823635_photo1_600px.jpg
1823635_photo1_orig.jpg

I want to insert into the database only the first portion of the original filename "1823635" without "_photo1_150px.jpg" or an extention.

I then want to access the images on the page using...
<img src="images/<?php echo $row_rsFeature['photo1']; ?>_photo1_600px.jpg" />

Thanks,

Jack

Sign in to reply to this post

Ray BorduinWebAssist

You may want to look into using Image resizer instead to begin with and only store the original image.

The advantage to that is that you don't have to limit yourself to one of 4 images like your current implementation. If later you decided you wanted a 200px version or a 185px version you would be stuck with a complex update of your database and existing records, but with image resizer you just change the size on the page and the rest of the work is done for you.

Here is a video that talks about how image resizer works: watch?v=FzQO0EX8A9I

Anyway if you wanted just that portion of the image you would probably have to parse it out:

<?php echo(substr($test,0,strrpos($WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"],"_"))); ?>



That would give you everything up to the last underscore in the server file name, which I think would work for what you are trying to do.

Sign in to reply to this post

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...