• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
is ERDragAndDropUpload broken? Or am I?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

is ERDragAndDropUpload broken? Or am I?


  • Subject: is ERDragAndDropUpload broken? Or am I?
  • From: Markus Ruggiero via Webobjects-dev <email@hidden>
  • Date: Sat, 21 Dec 2019 15:44:38 +0100

Started to look into ERAttachment and found this to be more or less what I need. Trying to implement things however don't go well. I want to use ERDragAndDropUpload component from ERAttachment but somehow the data is not properly transferred.

Here is the bindings:

Uploader : ERDragAndDropUpload {
attachment = currentERAttachment;
action = uploadAction;
completeAllFunction = finishedFunctionName;
configurationName = "UserAttachment.attachment";
editingContext = patient.editingContext;
storageType = "file";
includeFileSelector = true;
}

Everything seems to work but no data is available. When I set a breakpoint at ERDragAndDropUpload.takeValuesFromRequest I observe the following:

public void takeValuesFromRequest(WORequest request, WOContext context) {
NSData data = (NSData) request.formValueForKey(dropTargetID());
if(data != null) {
// this is always null

Adding a line to access the request contents I get (see screenshot)



_bytes == 0 ???, however _streamLength seems reasonable (uploading a 5.3 MB PDF). When I try to dump all formValueKeys (using the formValueKeyEnumerator from the request)  I get nothing and so formValueForKey(dropTagetID()) returns null. I tried to stream the contents() to a file with rawData.writeToStream(aFileOutputStream) just to get at the data somehow, but the resulting file is of length 0.

What am I missing?

Thanks a lot
---markus---


 _______________________________________________
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

  • Prev by Date: Re: Question re ERAttachment
  • Next by Date: Standalone D2W RuleModeler update?
  • Previous by thread: Re: Question re ERAttachment
  • Next by thread: Standalone D2W RuleModeler update?
  • Index(es):
    • Date
    • Thread