Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Form images to database

Community Beginner ,
Oct 11, 2008 Oct 11, 2008

Copy link to clipboard

Copied

My apologies if this subject is covered elsewhere as I tried several combinations of search words to no avail. I hate to admit that I have worked this problem, using routines from books and tutorial web sites rewriting what appears to be simple logic for several weeks.
The problem. I am trying to use a form to load image files (jpg) under 80k to an MySQL database while using html, php and MySQL. The form generated by Dreamweaver does not allow me to access any file that is not loaded on my hard drive. As I learned today, it appears to be a Mac thing. I finally ran across input on another forum that stated/implied that this function does not work on Leopard. Is this true? If so, is it being addressed in CS3? Is there a work-around? Before writing this note, I tried running my form on an old PC laptop and I did not have this problem. This may be old news.
TOPICS
Server side applications

Views

268
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 11, 2008 Oct 11, 2008

Copy link to clipboard

Copied

> I am trying to use a form to load image files (jpg) under 80k to
> an MySQL database while using html, php and MySQL.

You are using a form to upload images into a MySQL database? I can
understand this, but I'm a bit lost with where you go from there. Can you
try again, please?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"de king" <webforumsuser@macromedia.com> wrote in message
news:gcrjom$ldh$1@forums.macromedia.com...
> My apologies if this subject is covered elsewhere as I tried several
> combinations of search words to no avail. I hate to admit that I have
> worked
> this problem, using routines from books and tutorial web sites rewriting
> what
> appears to be simple logic for several weeks.
> The problem. I am trying to use a form to load image files (jpg) under 80k
> to
> an MySQL database while using html, php and MySQL. The form generated by
> Dreamweaver does not allow me to access any file that is not loaded on my
> hard
> drive. As I learned today, it appears to be a Mac thing. I finally ran
> across
> input on another forum that stated/implied that this function does not
> work on
> Leopard. Is this true? If so, is it being addressed in CS3? Is there a
> work-around? Before writing this note, I tried running my form on an old
> PC
> laptop and I did not have this problem. This may be old news.
>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 11, 2008 Oct 11, 2008

Copy link to clipboard

Copied

The form has a slot supported in the code as:
<input type="file" name="userfile" accept="image/*" value="" /> where ''value' will receive the URL to locate the image on the server that I want to access. However, the code generates
URL - Path to image: ______'slot'______________ |Browse| (button)

The code will not allow me to key an address into the 'slot'. It will only allow me to click on 'Browse' and select an image from my hard drive. I have used 3 browsers on my Mac w/ Leopard - Firefox, Opera and Safari with the same result. However, if I run he same logic on my PC laptop, it works.

Therefore, it would appear to me to be a problem with Dreamweaver - Mac logic or with Mac itself. BUT - it would seem to be somewhat big news??

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 12, 2008 Oct 12, 2008

Copy link to clipboard

Copied

So, let me rephrase your question, and tell me if I am correct.

You have a file field in your form. When you locally preview that page
containing the form, you want to enter an external path (not on your hard
drive) into that field? And you cannot manually enter this path on the Mac,
where you can only Browse to the file?

If that's correct, I'm still confused:

1. Why are you worried about how this functions during local preview?
2. It sounds like you are trying to preview locally and link to an image on
the server? Why?
2. I'm not at my Mac just now, so I can't test the functionality of the
file field on it, but I seem to remember that the Mac behaves exactly the
same way as the PC for a file field. Are you sure about this?
3. What is the 'accept="image/*" attribute in the file field for? There is
no such attribute for the <input> tag that I know of.
4. If you read the W3C description of the file field you will see that it
is intended to be used to select a LOCAL file which is then intended to be
uploaded to the server, not to select a server file to be downloaded to the
local computer. Am I correct that this is what you want to do?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"de king" <webforumsuser@macromedia.com> wrote in message
news:gcrthg$23v$1@forums.macromedia.com...
> The form has a slot supported in the code as:
> <input type="file" name="userfile" accept="image/*" value="" /> where
> ''value'
> will receive the URL to locate the image on the server that I want to
> access.
> However, the code generates
> URL - Path to image: ______'slot'______________ |Browse| (button)
>
> The code will not allow me to key an address into the 'slot'. It will
> only
> allow me to click on 'Browse' and select an image from my hard drive. I
> have
> used 3 browsers on my Mac w/ Leopard - Firefox, Opera and Safari with the
> same
> result. However, if I run he same logic on my PC laptop, it works.
>
> Therefore, it would appear to me to be a problem with Dreamweaver - Mac
> logic
> or with Mac itself. BUT - it would seem to be somewhat big news??
>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 12, 2008 Oct 12, 2008

Copy link to clipboard

Copied

Heh - I need to renumber my ordered list!

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:gcsn10$t6n$1@forums.macromedia.com...
> So, let me rephrase your question, and tell me if I am correct.
>
> You have a file field in your form. When you locally preview that page
> containing the form, you want to enter an external path (not on your hard
> drive) into that field? And you cannot manually enter this path on the
> Mac, where you can only Browse to the file?
>
> If that's correct, I'm still confused:
>
> 1. Why are you worried about how this functions during local preview?
> 2. It sounds like you are trying to preview locally and link to an image
> on the server? Why?
> 2. I'm not at my Mac just now, so I can't test the functionality of the
> file field on it, but I seem to remember that the Mac behaves exactly the
> same way as the PC for a file field. Are you sure about this?
> 3. What is the 'accept="image/*" attribute in the file field for? There
> is no such attribute for the <input> tag that I know of.
> 4. If you read the W3C description of the file field you will see that it
> is intended to be used to select a LOCAL file which is then intended to be
> uploaded to the server, not to select a server file to be downloaded to
> the local computer. Am I correct that this is what you want to do?
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> ==================
>
>
> "de king" <webforumsuser@macromedia.com> wrote in message
> news:gcrthg$23v$1@forums.macromedia.com...
>> The form has a slot supported in the code as:
>> <input type="file" name="userfile" accept="image/*" value="" /> where
>> ''value'
>> will receive the URL to locate the image on the server that I want to
>> access.
>> However, the code generates
>> URL - Path to image: ______'slot'______________ |Browse| (button)
>>
>> The code will not allow me to key an address into the 'slot'. It will
>> only
>> allow me to click on 'Browse' and select an image from my hard drive. I
>> have
>> used 3 browsers on my Mac w/ Leopard - Firefox, Opera and Safari with
>> the same
>> result. However, if I run he same logic on my PC laptop, it works.
>>
>> Therefore, it would appear to me to be a problem with Dreamweaver - Mac
>> logic
>> or with Mac itself. BUT - it would seem to be somewhat big news??
>>
>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 12, 2008 Oct 12, 2008

Copy link to clipboard

Copied

I wrote a reply which took me a long time to formulate and it has disappeared.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 13, 2008 Oct 13, 2008

Copy link to clipboard

Copied

LATEST
.oO(Murray *ACE*)

>[...]
>3. What is the 'accept="image/*" attribute in the file field for? There is
>no such attribute for the <input> tag that I know of.

| accept = content-type-list [CI]
| This attribute specifies a comma-separated list of content types
| that a server processing this form will handle correctly. User
| agents may use this information to filter out non-conforming files
| when prompting a user to select files to be sent to the server
| (cf. the INPUT element when type="file").

http://www.w3.org/TR/html401/interact/forms.html#adef-accept
http://www.w3.org/TR/html401/interact/forms.html#edef-INPUT

Micha

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines