Heya!
Wouldn't it be great if one is able to manage BLOB
fields with phpMyAdmin by being able to upload binary
files (images for example) from the local computer into
the database and have them (if correct content-type
defined for example) displayed in phpMyAdmin?
I don't know how much work that could be, but since i'm
trying long time to find something to get pictures in
mysql (for an addressbook with little photos) i would
greatly appreciate that...
Logged In: YES
user_id=210714
I have code here to do the upload, the storing, the
thumbnails and the picture display, what I don't know is
where phpMyAdmin would store the MIME type sent by the
browser during upload, to be able to send it correctly
while viewing.
Maybe in a special table, like we have in bookmarks?
Or we could support only JPEG?
Logged In: YES
user_id=210714
I have code here to do the upload, the storing, the
thumbnails and the picture display, what I don't know is
where phpMyAdmin would store the MIME type sent by the
browser during upload, to be able to send it correctly
while viewing.
Maybe in a special table, like we have in bookmarks?
Or we could support only JPEG?
Logged In: YES
user_id=210714
I have code here to do the upload, the storing, the
thumbnails and the picture display, what I don't know is
where phpMyAdmin would store the MIME type sent by the
browser during upload, to be able to send it correctly
while viewing.
Maybe in a special table, like we have in bookmarks?
Or we could support only JPEG?
Logged In: YES
user_id=145970
If this would be accepted by the coder community, it would
be great. The idea using a special table like the bookmarks
is a good hint and shouldn't make any problems with the
existing code. The $cfgProtectBinary could be easily used to
let the user configure the behaviour of blob fields.
Restricting it to JPEG would IMHO be not so good, since it
would restrict users too much and they probably won't use
this feature at all then. With being able to insert binary
data like images in the table would make users for example
use it for JPEG, GIF, PNG or some other binary types.
Logged In: YES
user_id=306
Storing the MIME type that the browser sends would be a bad
idea. You should never trust the client with things like
this, since it would be very easy to send an incorrect MIME
type header in order to bypass upload/download restrictions.
Logged In: YES
user_id=144058
Hi!
IMHO this is not a so good idea: even if BLOB field exists
to store Binary Long OBjects, every advanced user knows
that you should always tries not to use such a possibility
because it will increase too much the table size, widely
lower the efficiency of the SQL soft and so on. It's always
a better solution to just store a path or an id that refers
to the binary object stored as a file on the server.
But rookies don't know this and adding such a feature in
phpMyAdmin will encourage them to have some bad practices
in this area. For example this would be very painfull on
shared servers.
Loc
Logged In: NO
Just to add my two cents, this would be a very useful feature
and I hope it gets consideration.
Thanks,
Steve
Logged In: NO
Wow, talk about customer service! Thanks to everyone who
threw their ideas in.
To respond to Loic, I've spent several years in the field of
database design and administration. While it is better,
performance-wise, to do as you say and just store links and
upload the file to the webserver itself, it is not simpler; and
there are circumstances under which the data you want to be
stored couldn't be written as a file (easily). You also might
not want to store this file in a directory structure where you
don't have precise control over access to that object, where
the security system of MySQL would come in handy.
The main argument, however, runs like this:
- MySQL aspires to be a fully-featured SQL Server, as
production-ready and portable as Oracle
- PHPMyAdmin is the clear front-runner as a frontend for
MySQL
- A major feature of SQL servers is the ability to store large
objects (Be they character or binary), search them, and
retrieve them at will. A SQL Server without easy support for
those features will be at a disadvantage in the marketplace
- For that reason, I suggest that this might be a useful feature
to add to PMA.
Furthermore:
- Query speed isn't an object here (pun not intended),
because any user planning on using the BLOB features of
MySQL understands the performance hit this will mean, and
accepts that as necessary.
- Data size isn't an issue, because in general, most ISPs count
database size towards total size used. People who need to
use BLOBs for a production system, in general, will probably
have a dedicated server or at least wide latitude with their
database sizing.
- As for the dangers of storing / faking MIME types, if a
system allows BLOBs to be used, it is probably designed to
only accept certain MIME types; at the very least, the danger
that someone will later retrieve that data and use it in a
hostile fashion is minimal, given security arrangements.
I hope this doesn't make me sound totally stupid... please let
us know what the dev team thinks.
Thanks much,
Steve
Logged In: NO
I need such a feature !
Real applications should provide an own interface for
uploading data. But for debugging, or quick & dirty this
would be very cool.
But wouldn't limit it to JPEG or images at all. (thats too
application specific)
Woul prefer a simplistic version.. only an upload
field, not storing MIME types etc. (maybe as an option,
where you must provide the field to store into.. <select>).
Robbi
(sorry for bad english)
Logged In: YES
user_id=560360
I'm working on a documentation project where I work and I
need to store binary objects into a table, without using the
filesystem. The objects are documents in every format
possibile, (pdf, doc, xls, and even images).
To load the binary into a table, i encode them in base64,
thus enlarging the binary, but safely storing and retrieving
the contents without problems.
Logged In: YES
user_id=210714
Upload binary files to BLOB is now possible.
Display will be in a future version.