Giter Club home page Giter Club logo

cfwheels-attachments's People

Contributors

chrisdpeters avatar liferealized avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cfwheels-attachments's Issues

Error when i'm in production

Hello, I found an error when i'm trying to upload a file in production mode

Summary

Error:
Element STYLE.WIDTH is undefined in LOC.

Location:
Line 131 in plugins\Attachments\attachments\model\callbacks.cfm
Line 103 in plugins\Attachments\attachments\model\callbacks.cfm
Line 16 in plugins\Attachments\attachments\model\callbacks.cfm
Line 114 in controllers\ProductColors.cfc

Thanks for your help

`imageTag(attachment=x)` argument

We could add an attachment argument to imageTag that allows for you to pass an attachment URL instead of needing to be built off of the images/ folder.

Error when I save an object without add a file to upload

Hi all, I have this error message when I try to save an object without attached file.

The form field product[image] did not contain a file.

I hink it's really important to do that, if for exemple I want update an instance for another properties.
Thanks for your help.

Small error in doc

Hi Chris,

I found a small error in doc.

#startFormTag(action="create")# #fileField(label="Upload an Attachment" objectName="comment", property="attachment")# #submitTag(value="Upload")# #endFormTag()#

You should put a "," before objectName. and multipart=true in startFormTag.

Error while saving an object into MSSQL

While saving an object into mssql I get an error:

Cannot insert explicit value for identity column in table ‘tablename’ when IDENTITY_INSERT is set to OFF.

It happens only if I set 'hasAttachment("field_name")' in the table model.

When I upload a new file the old one does not delete

Hi, i look for a best practice to add this functionality to the plugin. i think it will be fine if the old files associated to an object will be delete from server, with all styles ect...

Do you have an idea ?

thanks

Error when i try to use Styles

Hi, I have this return when I try to create a resized version with an image file.

Element FILE.URL is undefined in THIS.

The error occurred in E:\SITES\THALES_ARIBA\plugins\Attachments\attachments\model\callbacks.cfm: line 78
Called from E:\SITES\THALES_ARIBA\plugins\Attachments\attachments\model\callbacks.cfm: line 58
Called from E:\SITES\THALES_ARIBA\plugins\Attachments\attachments\model\callbacks.cfm: line 16
Called from E:\SITES\THALES_ARIBA\wheels\global\cfml.cfm: line 174
Called from E:\SITES\THALES_ARIBA\wheels\model\callbacks.cfm: line 291
Called from E:\SITES\THALES_ARIBA\wheels\model\crud.cfm: line 846
Called from E:\SITES\THALES_ARIBA\wheels\global\cfml.cfm: line 174
Called from E:\SITES\THALES_ARIBA\wheels\model\transactions.cfm: line 53
Called from E:\SITES\THALES_ARIBA\wheels\model\crud.cfm: line 816
Called from E:\SITES\THALES_ARIBA\wheels\model\crud.cfm: line 896
Called from E:\SITES\THALES_ARIBA\controllers\Products.cfc: line 232
Called from E:\SITES\THALES_ARIBA\wheels\global\cfml.cfm: line 174
Called from E:\SITES\THALES_ARIBA\wheels\controller\processing.cfm: line 85
Called from E:\SITES\THALES_ARIBA\wheels\controller\processing.cfm: line 60
Called from E:\SITES\THALES_ARIBA\wheels\dispatch\request.cfm: line 166
Called from E:\SITES\THALES_ARIBA\wheels\index.cfm: line 1
Called from E:\SITES\THALES_ARIBA\rewrite.cfm: line 1
Called from E:\SITES\THALES_ARIBA\wheels\events\onrequest.cfm: line 1
76 : var loc = {};
77 : loc.style = arguments.styles[arguments.style];
78 : loc.image = ImageRead(ExpandPath(this.file.url));
79 : loc.largerDimension = loc.image.height > loc.image.width ? "height" : "width";
80 : loc.smallerDimension = loc.largerDimension == "width" ? "height" : "width";

I use this declaration :

hasAttachment(property="image", styles="medium:250x250,thumbnail:50x50", path="/images/:model/:id/:property/:style/:filename");

Thanks for your help

CF9 on IIS WIN XP / CFWHEELS 1.1.5 MySQL 5

Problem with URL encoding in paths

Consider a file with this name:

My File %28with parenthesis%29.pdf

(Yes, it's crazy to have a file name with percent signs in it, but it's happened in a client's system several times now... I'm guessing that they somehow ended up downloading a file with messed up URL encodings and then uploaded the file with messed up file name to our system.)

The filename in the paths saved to the database should look like this:

My%20File%20%2528with%20parenthesis%2529.pdf

Without this stored in the DB, you need some pretty ugly logic to URL encode just the file name after finding the record. Plus I feel that this should be generated on save and not after each find.

Working on a solution to this right now, but I thought I would log it here in case I get hit by a bus or something.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.