Commit graph

1758 commits

Author SHA1 Message Date
Artur Paikin
2f99b9d2c1 Fix tests too #612
//cc @goto-bus-stop
2018-02-18 02:31:55 -05:00
Artur Paikin
0fb5f6ba95 Followup fixes for #612
//cc @goto-bus-stop

should we change all progress events to file instead of fileId too?

#638 might be releavant too
2018-02-18 02:13:34 -05:00
Artur Paikin
d837e7c5f1
Merge branch 'master' into feature/tl-autotus 2018-02-17 22:12:24 -05:00
Artur Paikin
127e54ef22
Merge pull request #612 from transloadit/fix/response-errors
Revamp XHR response handling
2018-02-17 22:03:07 -05:00
Renée Kooi
270ba8e05d
s3: update response handling for #591, fixes #624 2018-02-13 13:13:00 +01:00
Renée Kooi
b510b62742
transloadit: Emit upload-error when preprocess fails. 2018-02-12 14:56:45 +01:00
Renée Kooi
5fe50de249
transloadit: Embed tus plugin.
When `importFromUploadURLs` is not set, add the `Tus` plugin with the
right configuration. This means that the `Tus` plugin is still included
in bundles when `importFromUploadURLs` is used; not ideal! Usability
wins are big here though.

Documentation updates will be in #546 to avoid tricky merge conflicts.
2018-02-12 14:23:58 +01:00
Renée Kooi
a3845214d7
Emit full file objects in most places, fixes #465 2018-02-12 13:37:59 +01:00
Renée Kooi
123ad62d7c
xhrupload: Rework response handling
- Make XHR responses available on the file object:

   ```js
   file.response === {
     status, // HTTP status code
     data, // response data (always available)
     error?, // if status is not 2xx
     uploadURL? // if response has an URL at which the file is now available
   }
   ```

...
2018-02-12 12:30:57 +01:00
Renée Kooi
1dd9719730
xhrupload: Improve getResponseError handling
When returning a string from `getResponseError`, it will be wrapped in
an Error instance.

When returning a falsy value from `getResponseError`, a default Error
message is used.

When returning something completely different, an Error instance is
created and its `.data` property will equal the return value.

Errors now include a `.request` property, whether they were caused by
the request failing entirely ('error' event) or the backend rejecting
it (during the 'load' event). Previously this only happened in the
second case.

Ref https://github.com/transloadit/uppy/issues/521#issuecomment-357612472
2018-02-12 12:30:23 +01:00
Artur Paikin
046cfe83cd
Merge pull request #584 from transloadit/fix/thumbnails-safari
[wip] Fix Safari image previews by using a slightly different step scaling
2018-02-10 12:04:10 -05:00
Artur Paikin
08505b71c2
Merge pull request #593 from transloadit/feature/tl-global-meta
transloadit: Easily pass form fields
2018-02-10 12:00:59 -05:00
Artur Paikin
c1fb3f9eb8 set bundle: false by default
//cc @goto-bus-stop
2018-02-09 18:42:52 -05:00
Artur Paikin
7a2305bd71 _throttledCalculateProgress — trailing: true to try and fix lost progress events in XHRUpload bundle: true
//cc @goto-bus-stop
2018-02-09 18:42:34 -05:00
Artur Paikin
3af56d724e add logging for _checkRestrictions too 2018-02-09 18:01:16 -05:00
Artur Paikin
6b5f276e5d add .catch() to .upload() in StatusBar (when button is pressed)
//cc @goto-bus-stop
2018-02-09 17:55:03 -05:00
Artur Paikin
4537233880 add console logging for restrictions error 2018-02-09 17:53:29 -05:00
Artur Paikin
4d1157ba44
Merge pull request #604 from transloadit/chore/add-file-rejections
`addFile()` rejections revamp
2018-02-09 17:52:24 -05:00
Artur Paikin
3601441a22 skip resize step test 2018-02-09 17:25:00 -05:00
Artur Paikin
3da1f8577a Remove comments, add protect, add links to posts 2018-02-09 16:40:11 -05:00
Artur Paikin
097940e6ae return empty response and log error if failed to parse JSON 2018-02-09 14:52:35 -05:00
Artur Paikin
af5d544488 Refactor Url a little, add error handling 2018-02-09 14:42:52 -05:00
Artur Paikin
22bce417e0
Merge pull request #597 from transloadit/improvement/chain-on
Add wrapper function for emitter.on
2018-02-09 12:33:36 -05:00
Ifedapo Olarewaju
cfaa0e68e7 fix: xhr getresponse args 2018-02-09 08:17:44 +01:00
Artur Paikin
ffe9aff17b return xhr.responseText like everywhere else, try/catch JSON.parse()
Browser tests are failing, I suspect its because it throws when trying to parse response in getResponseData here.

//cc @ifedapoolarewaju @goto-bus-stop
2018-02-09 01:13:54 -05:00
Artur Paikin
cfff63e226
Merge pull request #588 from transloadit/feature/import-from-url
[wip] Import from url
2018-02-09 00:40:27 -05:00
Artur Paikin
f9f0357016
Merge pull request #574 from transloadit/improvement/webcam-flip
[wip] Add `mirror: true` opt that flips webcam picture to act like mirror
2018-02-09 00:29:05 -05:00
Artur Paikin
ce1e13d0a5 Merge branch 'master' into feature/import-from-url
merge, resolve conflicts
2018-02-09 00:27:58 -05:00
Artur Paikin
53ccf3e4a2 Focus on input first, add locale strings, text instead of icon on the button 2018-02-09 00:13:50 -05:00
Artur Paikin
3a30f53247 Add new options to docs 2018-02-08 23:29:12 -05:00
Artur Paikin
67bdfe29d2 add off and bind both 2018-02-08 23:07:38 -05:00
Renée Kooi
4b24537a08
Catch addFile() errors in UI plugins
Prevents warnings in the console about unhandled rejections. We can
safely catch and ignore these errors, because they also show up in the
UI already anyway.
2018-02-08 21:53:12 +01:00
Renée Kooi
43a1aae5f4
transloadit: Accept array of meta field names in fields parameter. 2018-02-08 21:44:41 +01:00
Ifedapo .A. Olarewaju
e70156a131
Merge pull request #591 from transloadit/remote-multipart-response
feature: receive remote multipart upload response content
2018-02-08 18:56:35 +01:00
Ifedapo Olarewaju
98d4d68bc0 fix: slice not splice 2018-02-08 12:29:41 +01:00
Ifedapo Olarewaju
4ff1898465 fix: avoid double slash cc @kvz 2018-02-08 11:52:46 +01:00
Renée Kooi
e7eac4eb72
…and the default definition 2018-02-08 11:10:33 +01:00
Kevin van Zonneveld
99032b285e
[WIP] Set Transloadit uppy-server host based on Assembly status (#598)
* Maybe(?) set transloadit uppy-server location based on assembly status

* hack: replace uppy server url in transloadit assmebly cc @kvz
2018-02-08 11:07:50 +01:00
Artur Paikin
45f0f2d598 Add wrapper function for emitter.on that returns uppy instance for easy chaining 2018-02-07 00:56:58 -05:00
Artur Paikin
f1bc38c321 Don’t flip the resulting image when mirroring, just the preview 2018-02-07 00:14:59 -05:00
Artur Paikin
8c087d1b2d Fix webcam in Safari on Mac and iOS, add facingMode: user
using stream directly on srcObject video attribute, instead of createObjectURL
2018-02-07 00:14:09 -05:00
Artur Paikin
4c18bf18a1 rename to Url 2018-02-06 11:09:12 -05:00
Artur Paikin
e7c411dca4
Merge pull request #503 from fortrieb/master
Add german local
2018-02-05 12:26:46 -05:00
Artur Paikin
a00e997ab0
Merge pull request #499 from wilkoklak/polish-locale
Add Polish locale
2018-02-05 12:26:29 -05:00
Renée Kooi
26cafb1afe
core: Prevent unhandled rejection warnings in addFile() 2018-02-05 14:40:38 +01:00
Renée Kooi
5537bf4038
core: Consistent addFile rejections 2018-02-05 14:38:32 +01:00
Renée Kooi
64c76593a8
Merge pull request #449 from transloadit/feature/xhr-bundle
Add the XHRUpload `bundle` option.
2018-02-05 13:15:56 +01:00
Renée Kooi
955f63e30d
transloadit: Pass fields: true to add global metadata as fields. 2018-02-05 13:03:09 +01:00
Renée Kooi
efd03d96bb
Revert "transloadit: Add global metadata as fields"
This reverts commit 98cca8f98d.
2018-02-05 13:02:45 +01:00
Renée Kooi
98cca8f98d
transloadit: Add global metadata as fields 2018-02-05 11:51:59 +01:00