Hello Theodore,
On 2010-10-15, at 5:13 AM, Theodore Petrosky wrote:
> Thank you. this is perfect. (almost) of course I use only postgresql and
> there are differences. like I had to factor out of the migration0 anything
> dealing with the erattachment table and create a second migration with:
Just swap in the database plugin you need for your database and get rid of the
FrontBase plugin from the classpath.
Rerun the creation of Migration0 from EntityModeler and replace the version
that is in the project. That should get you the tables you need in the format
your database uses.
>
> public class Tutorial1 extends ERAttachmentMigration {
> public Tutorial1() {
> super("person", "erattachmentid", true);
> }
> }
>
> and of course postgresql wants to fold all table/entities to lowercase.
>
> now I can work backwards and understand what is happening.
>
> Questions:
>
> I see you set in the properties:
Watch the screen cast :-) which should be available pretty soon. I am just
making it available for Pascal to post now.
Also read the package overview as Kieran and Amedeo suggested. It explains all
the settings that are used below.
http://webobjects.mdimension.com/hudson/job/Wonder53/javadoc/er/attachment/package-summary.html
>
> er.attachment.Person.photo.tempFolder = /tmp
> er.attachment.Person.photo.maxSize = 2097152
Max file size allowed for upload
> er.attachment.Person.photo.storageType = file
file, db or S3
> er.attachment.Person.photo.file.overwrite = false
If true, a file with the same name overwrites, if false it adds a value to make
the filename unique
> er.attachment.Person.photo.file.filesystemPath = /tmp/erattachment
path to root folder for attachments
> In the development mode, where is this location. (I can not find the
> attachment folder)
It will create any folders it needs in the system path. The only caveat is that
it needs to be writeable by the application (in development OR deployment)
> In deployment, where is webobjects expecting this to live?
Doesn't matter. I think I am using
/Library/WebServer/Documents/ApplicationName/Attachment
If you use the filesystem you'll likely need to make the folder writeable for
your application.
You can also use Amazon S3 or your database. It is all completely configurable.
>
> Thank you for this wonderful example.
You are most welcome.
David
>
> Ted
>
>
> --- On Thu, 10/14/10, David Holt <[email protected]> wrote:
>
>> From: David Holt <[email protected]>
>> Subject: Re: help with ERAttachments
>> To: "Theodore Petrosky" <[email protected]>
>> Cc: [email protected]
>> Date: Thursday, October 14, 2010, 9:06 PM
>> I've uploaded a small demo project
>> here
>>
>> http://wiki.objectstyle.org/confluence/display/WONDER/ERAttachment+Framework
>>
>> There is a screencast to go with it once I figure out where
>> to put it :-)
>>
>> d
>>
>> On 2010-10-14, at 8:54 AM, Theodore Petrosky wrote:
>>
>>> Does anyone have an example of using ERAttachments?
>>>
>>> I am not using D2W and I just can not figure it out
>> from the Practical Wonder podcast.
>>>
>>> I want to save the attachments to file and then view
>> them. That's all.
>>>
>>> simple little app. but some help would really be
>> appreciated.
>>>
>>> Ted
>>>
>>>
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be
>> ignored.
>>> Webobjects-dev mailing list ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com
>>>
>>> This email sent to [email protected]
>>
>>
>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]