Search

An extension on the normal Upload field, this one hashes the filename using the current time as a seed, this allows multiple copies of the same file to be uploaded in the same location.

Brilliant - have wanted this for ages - cheers!

This is excellent — so useful. However when I resave the entry to which this field is attached, the image reference is lost completely. Could this be a problem of the filename being rehashed on each save and being lost, particularly if the path isn't simply in the root of Workspace?

Nick, this might be a little different than the version in your project, can you confirm it happens with this exact version?

Aha you're right. I had v1.0 which I must have copied from another project. I spotted the difference in v1.004 (checking the $data array), and upgraded to v1.004 which has solved this problem. Thanks!

so this can be used to upload images and if you resave the entry the image is on, it will retain its meta information?

I haven't checked whether the meta information remains or not. But the problem I was having was that the entire image was lost when the entry is resaved. v1.004 above fixes this.

Just run a quick test, and images do maintain their meta information correctly.

i know that meta information was an issue if say you created an image entry, uploaded an image and created other information like Title, Caption, etc. Then say you go back to that entry, but didn't reupload the image, but just modified the Title, then the meta info would be lost once you saved the entry again.

So, nick, you're saying that when you went back to an image entry and resaved it, you didn't need to reupload your image but it still retained the meta info?

Also, why are there two different zip files for this extension? What are the differences?

i know that meta information was an issue if say you created an image entry, uploaded an image and created other information like Title, Caption, etc. Then say you go back to that entry, but didn't reupload the image, but just modified the Title, then the meta info would be lost once you saved the entry again.

If you are referring to the system file upload field, this issue has been fixed in the git repository.

ah cool, thanks Nils. the git repo was exactly what I was looking for! didn't know that had a workaround

Awesome, this rocks. I'm using it in my latest project and it works perfectly.

My only criticism is that it leaves you with a bunch of unidentifiable files — I've made a tweak to my version so that it includes a normalised version of the original filename at the start of the file. I.e., mY COOl picture.JPG becomes my-cool-picture-a70a9d97785b67ea375640eac8d0162a.jpg. That just makes it easier to figure out what's what down the track.

Thanks again.

I created a variation of this extension which is simply adding the UNIX timestamp to the actual filename.

Unique Upload Field

I’ve attempted to upload the folder into my extensions folder but it never seems to show up in Symphony so that I can enable it. Am I doing something wrong?

Double-check the folder name. Downloading packages from Github results in misnamed folders.

7 points for Craig. Thank you sir.

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