01-04-2011
Hey I never refused I said I'd appreciate it, I even uploaded the files to be included in the image. I said I wanted to know because, it's always good to know how to fish, if you know what I mean.
8 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi, (HP-UX 11.11)
I need to create a tape image of an igniteUX image created on our igniteUX server.
That is to say. I have a "Online" image of the igniteUX of the targeted system but I now need to copy it to a useable TAPE (igniteUX) image so i can build an other server from it that is not... (3 Replies)
Discussion started by: Andrek
3 Replies
2. UNIX for Dummies Questions & Answers
hi i got a virtual linux machine running on qemu
my problem is connecting it to the internet
im a bit confused weather i have to make a virtual network card in qemu
and than tun tap it?
can anyone thats done it before help me out? (1 Reply)
Discussion started by: russian460
1 Replies
3. Programming
Hi, I got:
host machine: RedHat (RHEL6)
virtual machine: RedHat (RHEL6)
I run (on host machine):
qemu-system-x86_64 ...... -S -s
after that i run (on host machine):
gdb
target remote localhost:1234
set architecture i386:x86-64
and then i can use (on host machine) 'ctrl + c' to... (2 Replies)
Discussion started by: Chrisdot
2 Replies
4. Solaris
I am trying to install solaris 10-x86 as second OS on top of Windows XP. I have downloaded iso image from Oracle website and burned into bootable cd. when I loaded into CD-drive and made changes in BIOS to boot from CD. Its not reading from CD drive.
After restarting the system with CD(solaris... (8 Replies)
Discussion started by: SunSolars_admin
8 Replies
5. Shell Programming and Scripting
Hi, I have two sets of image files. Both sets have names A to Z but set 1 ends with .cdt.png and set 2 ends with .matrix.png. I want set 1 to match with set 2 if the names match (i.e. A.cdt.png will match with A.matrix.png) and with the convert image tool (program for images), it will merge the... (6 Replies)
Discussion started by: kylle345
6 Replies
6. IP Networking
hello networking folks,
i have 3 virtual machines that need to talk to each other
How can i create a bridge to loopback ?
-net tap,vlan=0,ifname=tap1
where tap1 is connected to lo:1 , tap2 is connected to lo:2 etc
thx (0 Replies)
Discussion started by: TwiceDone
0 Replies
7. Virtualization and Cloud Computing
Heyas
So, i like doing custom a LiveImage of my OS.
Using Redhats kickstart/livecd-creator method.
Anyway, so i would like to test the liveimages...
AND also, i WOULD like to install FreeBSD, Solaris, or whatever, onto a Virtual Machine.
I used to use Oracles Virtualbox, but eversince... (3 Replies)
Discussion started by: sea
3 Replies
8. BSD
Hi
Problem changed.
I've got a message showing on the screen which says
Guest has not initialized the display (yet)
Any how I can fix this?
Thanks Jack (4 Replies)
Discussion started by: lucky7456969
4 Replies
LEARN ABOUT PHP
mongogridfs.storeupload
MONGOGRIDFS.STOREUPLOAD(3) 1 MONGOGRIDFS.STOREUPLOAD(3)
MongoGridFS::storeUpload - Stores an uploaded file in the database
SYNOPSIS
public mixed MongoGridFS::storeUpload (string $name, [array $metadata])
DESCRIPTION
PARAMETERS
o $name
- The name of the uploaded file(s) to store. This should correspond to the file field's name attribute in the HTML form.
o $metadata
- Other metadata fields to include in the file document.
Note
These fields may also overwrite those that would be created automatically by the driver, as described in the MongoDB core
documentation for the files collection. Some practical use cases for this behavior would be to specify a custom chunkSize or
_id for the file.
Note
The filename field will be populated with the client's filename (e.g. $_FILES['foo']['name']).
RETURN VALUES
Returns the _id of the saved file document. This will be a generated MongoId unless an _id was explicitly specified in the $metadata param-
eter.
Note
If multiple files are uploaded using the same field name, this method will not return anything; however, the files themselves will
still be processed.
ERRORS
/EXCEPTIONS
Throws MongoGridFSException if there is an error reading the uploaded file(s) or inserting into the chunks or files collections.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 1.2.5 | |
| | |
| | Changed second parameter to an array of meta- |
| | data. Pre-1.2.5, the second parameter was an |
| | optional string overriding the filename. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
MongoGridFS.storeUpload(3) HTML form example
Suppose you have the following HTML form:
<form method="POST" enctype="multipart/form-data">
<label for="username">Username:</label>
<input type="text" name="username" id="username" />
<label for="pic">Please upload a profile picture:</label>
<input type="file" name="pic" id="pic" />
<input type="submit" />
</form>
If you wanted to store the uploaded image in MongoDB, you could do the following in the script handling the form submission:
<?php
$m = new MongoClient();
$gridfs = $m->selectDB('test')->getGridFS();
$gridfs->storeUpload('pic', array('username' => $_POST['username']));
?>
SEE ALSO
MongoGridFS.put(3), MongoGridFS.storeBytes(3), MongoGridFS.storeFile(3), MongoDB core docs on GridFS.
PHP Documentation Group MONGOGRIDFS.STOREUPLOAD(3)