When I'm trying to upload a 6 Mb image through uppy file input and submit the form, it seems it took long time for the request to complete. (The form freeze about 1-2 minutes depends on the file size, while the browser says "sending request to xxx.herokuapp.com..")
When I'm upload the same file through normal input, the request are much more faster. (see picture)
I notice that when uploading the file through uppy file input, in the request parameter it' also included the uploaded file.
How to set uppy file input with shrine to not include the uploaded file, so the request completed much faster?
--
You received this message because you are subscribed to the Google Groups "Shrine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-shrine+unsubscribe@googlegroups.com.
To post to this group, send email to ruby-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ruby-shrine/800976b1-d75e-48e4-a3b5-51b627c8d9a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Shrine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-shrine+unsubscribe@googlegroups.com.
To post to this group, send email to ruby-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ruby-shrine/d8defe10-3be4-427a-9302-1d21b1aa60cd%40googlegroups.com.
I'm using ap-southeast-1 (Singapore) . Singapore is about 1 hour flight from here. its the closest bucket it can get :D
BTW, i'm still confused about file that get uploaded on form submit (weird thing its happen when uploaded thru single file input only - picture attached). You said this is not intended behavior right? Just to make sure, you don't have this on your example right?
lastly, is there any chance CORS config could cause my problem?
I would recommend creating an S3 bucket that's closer to you.
I'm using ap-southeast-1 (Singapore) . Singapore is about 1 hour flight from here. its the closest bucket it can get :D
BTW, i'm still confused about file that get uploaded on form submit (weird thing its happen when uploaded thru single file input only - picture attached). You said this is not intended behavior right? Just to make sure, you don't have this on your example right?
lastly, is there any chance CORS config could cause my problem?
--
You received this message because you are subscribed to the Google Groups "Shrine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-shrine+unsubscribe@googlegroups.com.
To post to this group, send email to ruby-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ruby-shrine/e9c82708-64d1-42c9-9deb-61cdd3242e2a%40googlegroups.com.
I don't get this behavior when I submit the form, it only includes the JSON data from uploaded files. If this is the behavior you get, then for some reason the file input isn't getting cleared once the upload starts. Uppy internally does something like `fileInput.value = ""` to remove the selected file so that it doesn't get submitted.
I'm using ap-southeast-1 (Singapore) . Singapore is about 1 hour flight from here. its the closest bucket it can get :DOk, I guess we can rule that one out :)BTW, i'm still confused about file that get uploaded on form submit (weird thing its happen when uploaded thru single file input only - picture attached). You said this is not intended behavior right? Just to make sure, you don't have this on your example right?I don't get this behaviour when I submit the form, it only includes the JSON data from uploaded files. If this is the behaviour you get, then for some reason the file input isn't getting cleared once the upload starts. Uppy internally does something like `fileInput.value = ""` to remove the selected file so that it doesn't get submitted.I'm not sure what to tell you, I know it's not easy to debug stuff when you're new, but I'm simply not able to reproduce this (well, the slowness yes, but not the file being submitted with the form).lastly, is there any chance CORS config could cause my problem?I don't think so, CORS misconfiguration should typically result in the file being completely rejected.
On Sat, Apr 28, 2018 at 3:47 PM, <ha...@aipack.co.id> wrote:
I would recommend creating an S3 bucket that's closer to you.I'm using ap-southeast-1 (Singapore) . Singapore is about 1 hour flight from here. its the closest bucket it can get :D
BTW, i'm still confused about file that get uploaded on form submit (weird thing its happen when uploaded thru single file input only - picture attached). You said this is not intended behavior right? Just to make sure, you don't have this on your example right?
lastly, is there any chance CORS config could cause my problem?
--
You received this message because you are subscribed to the Google Groups "Shrine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-shrine...@googlegroups.com.
To post to this group, send email to ruby-...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-shrine+unsubscribe@googlegroups.com.
To post to this group, send email to ruby-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ruby-shrine/61954784-b43e-429d-ba96-8a03f82e1da6%40googlegroups.com.
It's strange that nobody reported it before...
uppy.on('upload-success', (file, resp, uploadURL) => { // ver 0.24.2uppy.on('upload-success', function (fileId, data) { // ver 0.22.0 on shrine demo rails app
using uppy v.0.24.2 on current shrine rails demo code will return JS error.
So, if we want to use newer Uppy version. Some code on Shrine demo rails will need to be change to accomodate uppy changes.
That's all from me right now. Thank you for your feedback and the amazing gem.!
Cheers,
Harry
Another wild guess, maybe just maybe.. more new shrine user are following other tutorials on internet -which doesnt use uppy- instead of official demo? so they don't have this problem?
Putting link to rails shrine demo on shrine read-me git page will make the rails demo code easier to find :) so others can check on the code.
I'm still receiving 302 response on form submit instead of 200 OK. Both on my own app/ shrine example clone also locally an on heroku. But it doesn't interfere with software functionality. Everything work correctly, uploading, S3, save to database etc. since its' not impact anything, i'm just gonna leave it as it it. - although i'm curious what causing the 302 response.
So, if we want to use newer Uppy version. Some code on Shrine demo rails will need to be change to accomodate uppy changes.
--
You received this message because you are subscribed to the Google Groups "Shrine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-shrine+unsubscribe@googlegroups.com.
To post to this group, send email to ruby-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ruby-shrine/4ca53c74-777b-4d9c-8fea-38ca2d908400%40googlegroups.com.