Turistforeningen / node-s3-uploader

Flexible and efficient resize, rename, and upload images to Amazon S3 disk storage. Uses the official AWS Node SDK for transfer, and ImageMagick for image processing. Support for multiple image versions targets.
https://www.npmjs.com/package/s3-uploader
MIT License
241 stars 54 forks source link

Original uploaded image does not have an extension when the path is specified #132

Open CodeStrumpet opened 7 years ago

CodeStrumpet commented 7 years ago

I'm trying to achieve a specific naming result with the uploaded S3 files but have been unsuccessful so far.

This is a pretty minor issue. When the path I pass to S3-uploader does not have an extension I can force my desired behavior on the versioned images (by specifying a suffix and the resultant image format) but the original image does not get an extension.

In my example, the path is the_whole_damn_thing_front_blunt. Notice in the screenshot below that the original image gets a period but does not have an extension appended.

image

When I put an extension in the path passed to s3-uploader, I get double extensions.

image

Is there any way to have the original image (in the first screenshot above) to get an extension when it is uploaded to S3?

Thanks for any insight and please let me know if this is not the appropriate place to pose this question.

webdevian commented 7 years ago

I'm having this problem too, I feel like I must be doing something wrong, this can't be the default behaviour

webdevian commented 7 years ago

@CodeStrumpet It seems that this happens if the tmp file on your server doesn't have an extension