Set Filename

Started by Julian5 replies21 views
JulianOriginal post
#1

Archived from the Transloadit support forum. Originally posted on July 18, 2011; details may be outdated, see our docs for current behavior. Original thread

Hi,

Is there a way to choose the filename of the upload. I am uploading from javascript and storing on S3.

Daniel
#2

Yes, if you could pass the desired filename from the jQuery plugin that would be great. As far as I can tell, there’s no option for that.

Felix_Geisendorfer
#3

We currently don’t support custom file names, but I’d like to know more about this request. Why would you want to change the file name? Are you concerned about the name on S3? How would you imagine this to work with a multiple file upload?

Daniel
#4

Hi Felix,

Thanks for your interest.

The main reason we’re looking to change our image filenames is for SEO purposes. Currently our image URLs are:

http://000.s3.amazonaws.com/22/3jh289d7s0932kjhldf98x7v76cx75/250x250.png

ie) If the title for the post is “Top 100 CPU Charts”, using jQuery we would automatically generate a filename “top-100-cpu-charts.png” and overwrite the filename “250x250.png” that the user uploaded.

Great service BTW, <3 Transloadit, makes my work life so much easier.

Daniel
#6

Just what I was looking for! Thanks for pointing me in the right direction.

😃