close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

image files problems

Thread began 9/27/2013 1:15 pm by Jamie | Last modified 10/01/2013 8:50 am by Jamie | 3426 views | 13 replies |

Jamie

image files problems

Sorry to lay another one on you today Jason!

I have a couple of questions - they both relate to the same set of pages.

1. I have an insert/update for special offers. I have got it so that the update uploads an image and renames the image to be the same as the id column. I dont know how to get the insert to do the same....

2. As in 1 above, when the images have been uploaded I cannot get them to display either on the front end or i the back end at all. They were displaying fine this morning but not now

any help you can give gratefully appreciated...

Sign in to reply to this post

Jamie

right, have managed to 'fix' issue 2 - for some reason domain.co.uk/offers/special-offer-name was causing this due to the mod rewrite but changing it to domain.co.uk/offer/special-offer-name fixed it... why would changing /offers/ to /offer/ have that effect?

still not able to figure out how to address issue 1....

Sign in to reply to this post

Jason ByrnesWebAssist

1) it's not possible to know the ID of the record before it is created. You would need to do the insert, the insert will store the ID in a session. then upload the file, using the session for the file name

2) Either the upload folder name is offer not offers, or something in your mod rewrite is renaming the folder.

Sign in to reply to this post

Jamie

how would I accomplish point 1 please Jason?

Sign in to reply to this post

Jason ByrnesWebAssist

I outlined how to do it in my response.

the upload must happen after the insert.

the insert will save the ID in a session
use the session for the file name in the upload behavior.

Sign in to reply to this post

Jamie

well I dont know what I am doing wrong as it is uploading the image but not giving it a file name at all... just uses .jpg

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the page please.

Sign in to reply to this post

Jamie

here you go

Sign in to reply to this post

Jason ByrnesWebAssist

you have the code for the upload file behavior before the inset record.

The record needs to be inserted first, before the file is uploaded.

Sign in to reply to this post

Jamie

oh right thanks

its uploading the image but if the record id is, for example, 21 its naming the image 20

also, its not adding the filename into the database column...

Sign in to reply to this post
loading

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