Re: d2w file upload help
Re: d2w file upload help
- Subject: Re: d2w file upload help
- From: Paul Hoadley <email@hidden>
- Date: Wed, 23 Nov 2016 10:37:45 +1030
Hi Ted,
With the caveat that I don’t use ERAttachment in a D2W setting... On 22 Nov 2016, at 10:52 PM, Theodore Petrosky < email@hidden> wrote: I have a ERAttachment relationship and I am upload assets. I need to upload .zip files and process them after they arrive. I need to unzip them. the contents of the zip is a webpage (index.html and images). Hopefully, I can unzip the file, and provide a link to this folder to view the webpage.
The filesystempath of erattachment looks like this:
/clientFiles/attachments/b/8/5/5.zip
if I end up with
/clientFiles/attachments/b/8/5/5
as a directory, I should be able to create a link to that folder.
or am I barking up the wrong tree?
I think you might be barking up the wrong tree. ERAttachment is really designed to represent a single file. (For example, the ERAttachment EO itself has attributes like size, thumbnail, width, height, mimeType.) You might be able to beat it into your use case, but there’s probably a better way of doing it.
how can i unzip this file after the uploads succeeds?
As a separate question, you can certainly do this. But you’d need to forget about using a component that automatically creates an ERAttachment, and use one of the regular upload components, like AjaxFlexibleFileUpload. You can then grab the InputStream provided by that component and do whatever you like with it. You can even later create ERAttachments from your post-processed files.
So, the summary is: I don’t think you’re going to win by trying to make an ERAttachment point to a filesystem directory, but everything else you’re talking about is completely possible.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden