Hey guys! i just want to know if you know any free image upload script where you upload your images temporary. I need the image files to be deleted over time.
There is no such a way/method/script. Write a code which delete image files once they are no longer needed.
Automatic?
No way, you can aways use like this simple example:
$id=(int)$_GET['id'];
$sql = "DELETE FROM imagens WHERE img_id=".$id;
$exe=mysql_query($sql, $conect);
if($exe) unlink($_GET['arq']);
mysql_close ($conect);
look, in a effective system, you need moore checks for a secure code :)
Related
Based on the Code How-To-Convert-PDF-to-Image-Using-Ghostscript-API
I trying to figure out how to get a image foreach page without creating the files
To get an image foreach Page i setted OutputToMultipleFile = true.
Then i went step for step through his code but i wasn't able to find the part where the files get created.
So i want to know what i need to change in this code?
or anything else which helps to achieve this
EDIT
here my current parameters:
args[0] =
args[1] =-dNOPAUSE
args[2] =-dBATCH
args[3] =-dSAFER
args[4] =-sDEVICE=pnggray
args[5] =-r130
args[6] =-sOutputFile="C:\Scannen1.PDF%d.png"
args[7] ="C:\Scannen1.PDF"
You need to use a device which doesn't write to file, all the image format devices write their output to file. You could use the display device which will return you a bitmap in memory as a template and write your own device, or you can modify one of the existing devices.
Modifying an existing device is a task for a developer and while not excessively difficult is not trivial either.
In any event, you aren't going to get what you want by fiddling with command line switches. Like Sinatr I'm puzzled by what you can usefully do with Ghostscript which doesn't involve writing to file.
Oh, one other possibility is to load the nulldevice, which is done in PostScript and is simply a bit bucket.
I'm working on an image uploader and if a user uploads a image I want to change the image name to something unique.
Imgur also does this for example "11Z6nlI.jpg"
So how can I generate a unique combination? I was thinking of using a timestamp since but that will also causes problems when more users upload at the same second.
I hope you guys can help me, I'm working in PHP
Although sometimes clunky, GUIDs are a good way to generate unique strings. See here for a way to generate GUIDs within PHP.
I’m new to EE and trying to learn the basics. Some questions about the File Manager:
I upload a photo and put “cat, kitten” in the description. When I do a search for “kitten”, it finds the photo. But when I do a search for “cat”, I get nothing. Any ideas what’s going on?
The file metadata are: file title, file name, description, credit, and location. What if I wanted to add custom fields? How do I do that?
In the template files, how do I access a particular manipulation (I call this “rendition”) of an image? Say I define a rendition “thumbnail” to be 100x100. How do I access that particular rendition in a template?
Is there a way to randomize the file names of the files being uploaded?
After uploading an image and testing it against PageSpeed, it turns out that the image can still be optimized via losslessly compressing it. How can this problem be addressed?
Ah, the file manager. Not EE's brightest spot.
It would not surprise me if the search in the File Manager was not
very robust. I'd try more variations to narrow it down (what kind of
characters affect the results - commas, dashes, spaces, etc ... do
partial terms match?)
You cannot currently add custom metadata to files in the file manager.
Use this syntax: {field_name:rendition}, e.g.,
{my_image:thumbnail} (docs).
Nope.
EE just uses the GD library available in your PHP install to resize
images. If you want the highest possible optimization, you'll have
to do your image manipulations yourself.
Given your queries, I would suggest you have a look at Assets by Pixel and Tonic. It offers a far superior file management experience on most of these fronts.
Is there any way to make the "image" module store files under a new name on upload? Basically, someone could upload a file that says something like "macs are cool" or something equally absurd. Now, I don't want people to see that. I'd much rather have all the files renamed on upload to something like: "111494949478383.jpg". How would I go about accomplishing this?
The FileField Paths module should do what you want. It works with both core Upload, as well as the FileField and Imagefield modules. You may also want to check out Imagefield Tokens, which allows the use of node tokens in things like the default alt text for images.
You can use the module "filefield Paths", and put in the filename [raw] that way the uploaded picture will have the node's timestamp creation time.
Also you can use [raw]_[filename].[file-extension] or whatever combination you can use, take a look at "file name replacement patterns"
with hook_nodeapi you could move the files and rename the images when the node is saved.
Or you could add something to the image upload callback with hook form alter to rename the image once it has been uploaded
yep, form_alter is the way to go for this
there are file modules that basically use tokens to do this
edit also imagefield supports tokens http://drupal.org/node/152640
immagefield could be better in long run if cck going to Drupal 7
hope that helps
I would like to create a image uploading service (yes, i am aware of imageshack, photobucket, flickr...etc) :)
I have seen only imageshack show the directory names ("img294", "1646") of where the image is located, in the same way - i would like to do this.
http://img294.imageshack.us/img294/1646/**jquerykd5**.jpg
1) Are there any security issues I should be aware if i take this implementation?
2) How do these sites come up with short unique identifiers ("kd5")?
Thanks all for any advice and help.
Well for starters, unless you would like the directory to be public, put dummy index.html files in there or just restrict access to public users for those directories.
As for the unique identifiers there are many ways of going about this... some of my favourite chunks of information to use:
UNIX time (if running a unix based server)
chunks of the md5 of the file
pseudo random numbers
piece of the original filename
With these and many other pieces of information at your fingertips it should be easy to prevent duplicate image names conflicting on your server as well, you can gather as many as you like and concatenate them into a string for the filename. The md5 can be placed in a database as well to aid in a method of duplicate image detection, which could save you disk space as well.
I can promise you they all use URL rewriting. This will help with security issues, too.