Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I am in need for some hints on how to upload an image from my lokal disk, to a container field in my database.

Have tried something like this:

---------------

<?php

if(is_uploaded_file($_FILES['form_image']['tmp_name']))

{

// file uploaded to server

echo "file information is :-<br />";

print_r($_FILES);

$imageInfo = getimagesize($_FILES['form_image']['tmp_name']);

$width = $imageInfo[0];

$height = $imageInfo[1];

$image_type = $imageInfo[2];

print_r($imageInfo );

// move_uploaded_file($_FILES['form_image']['tmp_name'], "./test/".$_FILES['form_image']['name']);

}

else

{

echo "file not uploaded to server";

}

?>

<html>

<body>

<form name="file_upload" method="post" action="process.php" enctype="multipart/form-data">

<input type="hidden" name="MAX_FILE_SIZE" value="1000000" />

<input type="file" name="form_image" />

<input type="submit" value="Send this file!">

</form>

</body>

</html>

----------------

Would it be possible to use the $_FILES['form_image']['tmp_name'] in an FMEdit()? Or are there some other obstacles on my way?

I'm fairly sure that you cannot use CDML to add to a Container field. You may have to combine it with an Applescript.

Good Luck.

Garry

Hi Max!

I see you found the forum that suits your question better!

Garry...I am currios to know why not use an alternative!

Theoretically:

-if the images are referenced you can just "Create a New Record" and provide filename and path.

As far as web is concerned u never really have to "insert images" into DB (container) but rather record the paths (text) relative to the server and then display it as usually:

eg.

---main.fp5----------

[img_name] [image_path] [image_URL]=image_path & img_name

abc.jpg /images/

---------------------

The idea would be to have "virual folder" (eg. 'images') pre-set.

from FM prespective:

I posted a small sample on (fm6 ) on importing images as folders that can be used a "admin" part of it all should the user need to use only FM to access the DB...

...again, if this is stricly web use then just the path info is enough

perhaps I spent too much time on other forums but this would be initail idea...hope it helps

Take care!

I perfer to have just the image filename in the database. You then have full control of building paths/URLs etc. The images can then be anywhere, even on a mounted Firewire drive!

You can also construct paths (or names) to thumbnails, different versions etc.

All the best.

Garry

well, Max...there u go! :

Gary, thanx for reasssurance!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.