liferealized / cfwheels-attachments Goto Github PK
View Code? Open in Web Editor NEWA CFWheels plugin to easily upload files in your wheels models.
Home Page: http://iamjamesgibson.com/code
A CFWheels plugin to easily upload files in your wheels models.
Home Page: http://iamjamesgibson.com/code
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
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.
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.
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.
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.
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
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
Similar to what I implemented for imageTag()
. I'll try to get it in today.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.