Search

Am I right in thinking that with the latest Symphony release (2.3.1), this extension is no longer required?

#672 - Automatically rename files when a clash is detected in the Upload field. Consider example.jpg, will be renamed to example_1.jpg. If that file exists, 1 will keep incrementing until a filename is available

I use this extension on virtually every project, so it would be great to reduce my standard extensions by 1.

@stuart, I still use it for busting the cache. If you were to delete your file, and upload a different one with the same name, the cache would see no difference.

With the unique upload field, a different hash is appended, so you'll get a fresh copy automatically.

@huib thanks for the clarification. I see the advantage here.

Would it be possible to add resizing to this extension? I need unique file names AND resizing. Users are uploading 10 megapixel images, and performance with JIT image manipulation is really slow.

Would it be possible to add resizing to this extension? I need unique file names AND resizing.

You have it here.

Wow, how did I not find that extension. Thanks!!

Happend also to me :o)

And please note, it will have the same issue with upcomming Symphony 2.3.3 as this extension because of the new file path handling, that is to migrate older image upload field entries before SCMS 2.3.3 to the new file path logic. For this case, an update will be needed.

Alright, I will hold off updating to 2.3.3. Thanks for the heads up :)

For the Unique Upload Field I added the updater function. It should work, but I had some problems with testing, so that part is not finished.

Thanks Michael!

I fixed the extension's updater for Symphony 2.3.3, and I am sure it is working now. Please use the latest code fro GitHub.

I am using this extension for the first time and I have noticed, that long filenames are being truncated to first 32 chars and afterwards adding the hash.

Is it OK like this?

Huh, I hope not.

I have the latest versions of everything.

EDIT: Sorry, it's in the description that filenames are cropped.

I have removed the cropping aspect. Is there any drawback?

Works fine for now.

Yeah cropping is a feature, not a bug. :-) The main rationale behind it: I had users who uploaded an image for one article, later downloaded and re-uploaded the same image (when they needed it for another article). You see what happens without cropping? Filenames will get longer with every "re-use" of the file. This is the only potential downside if you remove the cropping.

Hah, thanks for clarifying :) Actually all in all I was astonished about how little code is such a usefull extension made. Quite elegant.

Quite elegant.

Thanks a lot! :-)

Sure thing and I thank you! :)

Is there a way to convert an upload_field to a unique_upload_field while retaining data?

Sorry to bother if this is covered somewhere else, but I wasn’t able to find any info on this.

There is no automatic routine to handle this. But from the top of my head, you should be able to export the content of the Upload Filed's database table and import this in to the Unique Upload Field's table. This might even work without changing the filenames.

I suggest to first try it with a single table row. :-)

Thanks Michael, sounds doable :)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details