Force to upload 1 image with the same name in Codeigniter - image

I have made an image upload page. this all works smooth.
My problem is when i upload an image called filename.jpg and i upload it again the same image uploads but changes the name to filename1.jpg
how can i force this and make a message with something like 'the image you upload was allready uploaded'
thanks

the change in filename was initiated by the os of server computer
to produce the promt you have to check the file name for duplicates while you are uploading
using the php script
if you have a database which stores the filenames then it is very easy

Related

Domain in image url and problems with uploading some images

Domain in image URL and problems with uploading some images,
I need to have all the images I upload be referenced through their full web URL (ie: http://www.mywebsite.com/images/image/myimage.jpg). By default, CKEditor only goes for /images/image/myimage.jpg. I found a way to work around this by putting the domain name in the upload file path, however, I think this is causing some files not to be uploaded.
What is the best way to get the domain name in all uploaded image paths and still be able to upload all files?
enter image description here

How to get relative URL path for an image uploaded on Oracle WebCenter

We are working on a requirement where we have to show a signature image on an RTF Template. This signature changes for one bank to other, so we are thinking to upload them in UCM server and use the URL's relative path concatenated with Bank Account ID/Number to fetch the image into RTF.
But, when we upload image by following Note 1605094.1 we are not able to get a relative path to hard code in our template file.
Uploaded one image (5486173210.gif), and the URL generated is as below
http://<ucmhost>:<ucmport>/cs/groups/public/documents/digitalmedia/ndg2/mtcz/~edisp/5486173210.gif
And the second image (11223344.gif) got the URL like below
http://<ucmhost>:<ucmport>/cs/groups/public/documents/digitalmedia/mdex/mjiz/~edisp/11223344.gif
We are looking for a common relative URL path, so that we can hard code that in our RTF Template.
URL something like below helps us.
http://<ucmhost>:<ucmport>/cs/groups/public/documents/digitalmedia/logos/5486173210.gif
http://<ucmhost>:<ucmport>/cs/groups/public/documents/digitalmedia/logos/11223344.gif
How about using the GET_FILE service URL?
http://<ucmhost>:<ucmport>/cs/idcplg?IdcService=GET_FILE&RevisionSelectionMethod=LatestReleased&allowInterrupt=1&dDocName=

Laravel Image error

Hello can anyone help me with this problem in laravel?
In local server when I upload image it is working but in live server it is not working because of this problem:
[2015-05-22 10:38:23] production.ERROR: exception 'Intervention\Image\Exception\NotWritableException'
with message
Can't write image data to path (/var/www/vhosts/domain-name/httpdocs/mainsource/img/courses/1432291103.jpg)
and if i create a folder inside mainsource img/courses image will be saved but doesn't show in the page.
Also i have the same folder img/courses in public from which also my courses page reads images and shows images.

Carrierwave AWS No Change When Re-uploading Image with Same FIle Name

I am currently using carrierwave-aws to upload to my S3 bucket.
One issue I am having is after the image is uploaded and saved, if the user, lets say changed something about the image locally and re-submitted for upload with the same file name, it will not reflect the new file uploaded.
The user has to change some part of the file name for it to show the correct one in my application.
I am assuming this is a caching issue but not sure where to begin to address this matter.
Has anyone else experienced this?
If your S3 bucket is set with a long or infinite expiry (which is a good idea for performance), you'll need to change the filename each time the image changes. See the Carrierwave wiki page on how to do this.

Preventing file upload by submitting a form which has file tag

My client has millions of users driver website. I had to implement a custom file upload using AJAX/jQuery.
The file upload field is just needed to create a clickable and drop-downable file upload mechanism. Everything is working fine except when I submit the form it uploads the file again which has already been uploaded using ajax.
How can I prevent this uploading?
Move the file input to outside the form or replace the file input with a new one when you upload the file.

Resources